- Back to Home »
- c programms »
- write a C program to check odd or even using modulus operator
Posted by : thedev27
Friday, October 25, 2013
#include<stdio.h>
main()
{
int n;
printf("Enter an integer\n");
scanf("%d",&n);
if ( n%2 == 0 )
printf("Even\n");
else
printf("Odd\n");
return 0;
}