#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("Enter any number ");
scanf("%d",&num);
if(num%2==0)
printf("%d is even.",num);
else
printf("%d is odd.",num);
getch();
}
Output
Enter any number: 5
5 is odd.
No comments:
Post a Comment