Pages

Saturday, 19 May 2012

program to input number and find out Even and Odd


23./*Write a program to input number and find out Even and Odd*/

#include<stdio.h>
#include<conio.h>
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