Program to check whether given number is even or odd
#include <stdio.h>
#include <conio.h>
void main()
{
int number;
clrscr();
printf("\nEnter the number : ");
scanf("%d",&number);
if(number %2 == 0)
{
printf("\nGiven number is Even");
}
else
{
printf("\nGiven number is Odd");
}
getch();
}
Output :
0 comments:
Post a Comment