Aim- WAP To Check Whether Entered Number Is Odd or Even
code-
#include<stdio.h>
#include<conio.h>
void main()
{
int x;
clrscr();
printf("Enter The Number To Check : ");
scanf("%d",&x);
if (x % 2 == 0)
printf("\n %d Is An Even Number");
else
printf("\n %d Is An Odd number");
getch();
}
OUTPUT
Enter The Number To Check: 41
41 Is An Odd Number
No comments:
Post a Comment