C PROGRAMMING

c program to check is entered number odd or even

#include <stdio.h>
#include <conio.h>
int main() {
int num;
printf("Enter a number to check is it even or odd : ");
scanf("%d",&num);
if (num%2==0)
{
printf("%d is an even number",num);
}
else
{
printf("%d is an odd number",num);
}
return 0;
getch();
}
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button