whether number is even or odd
/*whether number is even or odd*/
#include<stdio.h>
#include<conio.h>
void main()
{
int num,remainder;
clrscr();
printf("enter the number\n");
scanf("%d",&num);
remainder=num%2;
if (remainder==0)
printf("the number is even\n");
else
printf("the number is odd\n");
getch();
}
OUTPUT
enter the number
121
the number is odd
Comments