Write a program to find whether the given number is odd or even using simple-if.
/* Write a program to find whether the given number
is odd or even using simple-if.*/
#include <stdio.h>
void main()
{
int n;
printf("Enter
the number : ");
scanf("%d",&n);
printf("The
given number is ");
if(n%2==0)
printf("Even\n");
else
printf("Odd\n");
getch();
}
Comments
Post a Comment