Friday, April 10, 2015

9. For any integer input through the keyboard write a c program to find out whether it is odd or even number.


#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("\n Input any number:-");
scanf("%d",&num);
if(num%2==0)
  printf("\n %d is even number",num);
else
 printf("\n %d is odd number", num);
getch();
}

No comments:

Post a Comment