NBA - Boston Celtics

Tuesday, 17 January 2012

To find the given no. is odd or even????

#include
#include
void main()
{
int a;
clrscr();
printf("enter the value of a = ");
scanf("%d",&a);
if(a%2==0)
{
printf("%d is even",a);
}
else
{
printf("%d is odd",a);
}
getch();
}

No comments:

Post a Comment