Monday, January 4, 2010

Program to find whether given no is even or odd

#include
#include

void main()
{
int n;
clrscr();
printf("enter any no: ");
scanf("%d",&n);
if(n%2==0)
printf("no is even");
else
printf("no is odd");
getch();
}



Output:
enter any no: 5
no is odd

No comments:

Post a Comment