PROGRAM : Given number is Odd or Even
#include<stdio.h>
int main()
{
int i;
printf("Enter a
Number to know whether it is even or odd\n");
scanf("%d",&i);
if(i%2==0) //To check given even or not
printf("The number %d is Even",i);
else
printf("The number %d is
Odd",i);
return 0;
}
Input : 5
No comments:
Post a Comment