Determine If a Number is Odd or Even

How to write a c program to determine if a number is odd or even  in C programming ?


Solution:
#include <stdio.h>

int main()
{
int x;

scanf("%d", &x);

if(x % 2 == 0)
printf("Even");
else
printf("Odd");

return 0;
}


Learn More :