This Program checks whether the entered number is even or odd...
Any integer is input through the keyboard.
Any integer is input through the keyboard.
Source Code
#include<stdio.h>
main()
{
int num;
printf ("Enter a number to be checked for even/odd: ");
scanf ("%d",&num);
if (num%2==0)
{
printf ("The entered number is EVEN.\n");
}
else
{
printf ("The entered number is ODD.\n");
}
}
Output
0 comments:
Post a Comment