// write a c program to find a number is even or odd
// Check a number is even or odd using c
// Print a number is even or odd in c language
// C Program to find a number is even or odd
#include<stdio.h>
main()
{
int num;
printf ("Enter a number to check 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:
Enter a number to check for even / odd:2
The entered number is EVEN.
No comments:
Post a Comment