Saturday 10 December 2011

Write a program to input number and find out Even and Odd in c

#include
#include
main()
{
int a;
clrscr();
printf("Enter A Number:");
scanf("%d",&a);
if(a%2==0)
{
printf("This is A Even Number");
}
else
{
printf("This is A Odd Number");
}
getch();
}

OUTPUT
Enter A Number:4
This is A Even Number

No comments:

Post a Comment