Program : -
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter an integer you want to check: ");
scanf("%d",&num);
if((num%2)==0) /* Checking whether remainder is 0 or not. */
printf("%d is even.",num);
else
printf("%d is odd.",num);
getch();
}
Output 1 : -
Enter an integer you want to check: 25
25 is odd.
Output 2 : -
Enter an integer you want to check: 12
12 is even.