Tuesday 1 October 2013

C PROGRAM TO FIND ODD OR EVEN

#include<stdio.h>
void main()
{
int a;
clrscr();
printf("Enter a number");
scanf("%d",&a);
if(a%2==0)
   {
   printf("%d is even",a);
   }
else
   {
   printf("%d is odd",a);
   }
getch();
}

No comments:

Post a Comment