#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int num;
clrscr();
printf("Enter the number = ");
scanf("%d",&num);
if((num%2)==0)
{
printf("Number is Even.");
}
else
{
printf("Number is Odd.");
}
getch();
}
Output:
Enter the number = 10
Number is Even.
#include<conio.h>
#include<math.h>
void main()
{
int num;
clrscr();
printf("Enter the number = ");
scanf("%d",&num);
if((num%2)==0)
{
printf("Number is Even.");
}
else
{
printf("Number is Odd.");
}
getch();
}
Output:
Enter the number = 10
Number is Even.
0 Comments