To find even or odd number


/*Write a program to find even or odd no*/

#include<stdio.h>

main()

{

int num;

clrscr();

printf(“enter any no”);

scanf(“%d”,&num);

if(num%2==0)

printf(“number is even”);

else

printf(“number is odd”);

getch();

}

Output:  

         

 

 

Related Posts

Comments are closed.