Write a program in c find the number is even or odd

Find the number is Even or Odd

#include<stdio.h>
#include<conio.h>
main()
{
int a;
printf("Enter The Number: ");
scanf("%d",&a);
if(a%2==0)
{
printf("a is even");
}
else
{
printf("a is odd");
}
getch();
}


Output:





Post a Comment

0 Comments