//Code:
#include
#include
void main()
{
int a,even,odd;
clrscr();
printf("\n Enter the positive integer : ");
scanf("%d",&a);
if(a%2==0)
printf("\n The number is even");
else
printf("\n The number is odd");
getch();
}
/*Output:
Enter the positive integer : 23
The number is odd
Enter the positive integer : 12
The number is even
No comments:
Post a Comment