wap to determine whether a given program is odd or even and print them without using else.


#include<stdio.h>
void main()
{
int a;
scanf("%d",&a);
if((a%2)==0)
printf("is an even no");
if((a%2)!=0)
printf("it is an odd number");
}


NOTE-  i have compiled this program in codeblocks if u do it in turbo c++  use  conio.h  header file in the beginning  and getch()  a the  last

No comments:

Post a Comment

Implemet Stack in python

  class Stack : def __init__ ( self , data ): self . stack = [] if ( data ): self . stack . append ( da...