Computer Science, asked by ganeshmahajan3357, 11 months ago

Write a 'C' program to check whether a given number is even or not.

Answers

Answered by Anonymous
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