Program to check a number is Even or Odd
Input :-
Output :-
1)
2)
Code :-
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
printf("Enter a number : \n");
scanf("%d",&a);
{
if (a%2==0)
printf("The number is even\n\n");
else
printf("The number is odd\n\n");
}
return 0;
}
0 Comments:
Post a Comment