Thursday, July 22, 2010

Write a programe to check the number is even or odd

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

No comments:

Post a Comment