Develop a C program to check whether given integer number is ODD or EVEN using using if...esle statement.

Code

#include <stdio.h>
int main() {
int num;
printf("Enter an integer: ");
scanf("%d", &num);

// true if num is perfectly divisible by 2
if(num % 2 == 0)
printf("%d is even.\n", num);
else
printf("%d is odd.\n", num);
return 0;
}

Output


Try -56 and comment your answer