Answer:
#include<stdio.h>
#include<stdbool.h>
bool isEven(int x);
main()
{
int n;
bool v;
printf("Enter an integer: \n");
scanf("%d", &n);
v = isEven(n);
if(v==true)
printf("\n The integer is even");
else
printf("\n The integer is odd");
}
bool isEven(int x)
{
if(x%2==0)
return true;
else
return false;
}
Explanation:
if the integer is divided by 2 then the integer is even
else the integer is odd.