Sunday 20 October 2013

Even Odd in C

#include <stdio.h>
#include<conio.h>
void main()
{
int x;
        printf("Enter an integer\n");
       scanf("%d",&x);
       if ( x%2 == 0 )
          printf("Even\n");
      else
         printf("Odd\n");
      getch();
}

No comments :

Post a Comment