#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a number: ");
scanf("%d",&num);
if(num%2==0)
{
printf("\n%d is an even number.",num);
}
else
{
printf("\n%d is an odd number.",num);
}
getch();
}
Please have a look at the below video lesson posted on my YouTube channel:
#include<conio.h>
void main()
{
int num;
printf("Enter a number: ");
scanf("%d",&num);
if(num%2==0)
{
printf("\n%d is an even number.",num);
}
else
{
printf("\n%d is an odd number.",num);
}
getch();
}
OUTPUT:
No comments:
Post a Comment