Check weather a number is even or odd in c
#include<stdio.h>
int main()
{
int a, b;
printf("Enter the number\n",a);
scanf("%d", &a);
if(a%2==0)
printf("The number is Even\n");
else
printf("The number is Odd\n");
return 0;
}
#include<stdio.h>
int main()
{
int a, b;
printf("Enter the number\n",a);
scanf("%d", &a);
if(a%2==0)
printf("The number is Even\n");
else
printf("The number is Odd\n");
return 0;
}
Comments
Post a Comment