Loading

Showing posts with label Odd/Even. Show all posts

C Program for Odd/Even Number

 C Program to Check whether a Number is Odd/Even


#include<stdio.h>

main()
{
   int n;

   printf("\n Enter an integer ::");
   scanf("%d",&n);

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

   return 0;
}

Posted in | Leave a comment