Program to cheque enter number is even or odd in c-language
#include<stdio.h>
int main()
{
int x;
printf("Enter the number\n");
scanf("%d",&x);
if(x%2==0)
{
printf("Enter number %d is even",x);
}
else
{
printf("Enter number %d is odd",x);
}
}
OUTPUT
Enter the number
17
Enter number 17 is odd
Visit Homepage
Comments
Post a Comment