Sunday, 24 February 2013

To Find Number is Even or Odd


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

Output
Enter the Value of a
5
a is odd

No comments:

Post a Comment