C/C++ program to check odd or even

how to find a odd or event number wuth c or C++ programming ? here is a simple program  to check the input number is even or odd

#include <stdio.h>
int main()
{ int number;
printf(“Enter an integer: “);
scanf(“%d”, &number);
// True if the number is perfectly divisible by 2
if(number % 2 == 0)
printf(“%d is even.”, number);
printf(“%d is odd.”, number);
return 0;

Leave a reply