Write a 'C' program to check whether a given number is even or not.
Answers
Answered by
0
Odd or even program in C using modulus operator
#include <stdio.h>
int main()
{
int n;
printf("Enter an integer\n");
scanf("%d", &n);
if (n%2 == 0)
printf("Even\n");
else
printf("Odd\n");
return 0;
}
Similar questions