/* Check a number is even or odd */
#include<stdio.h>
int main()
{
int a;
printf("Enter a number: ");
scanf("%d",&a);
if(a%2==0)
printf("Even Number");
else
printf("Odd Number");
return 0;
}
#include<stdio.h>
int main()
{
int a;
printf("Enter a number: ");
scanf("%d",&a);
if(a%2==0)
printf("Even Number");
else
printf("Odd Number");
return 0;
}
No comments:
Post a Comment