C Program to Check Whether the Given Number is Odd or Even

0
772

To Check Whether the Given Number is Odd or Even

#include <stdio.h>
 
int main()
{
   int n;
 
   printf("Enter a Number\n");
   scanf("%d", &n);
 
   if (n%2 == 0)
      printf("Even\n");
   else
      printf("Odd\n");
 
   return 0;
}

Leave a Reply