C++ Program to Check Whether Number is Even or Odd

#include <iostream>
using namespace std;
int main() {
   int num = 25;
   if(num % 2 == 0)
   cout<<num<<" is even";
   else
   cout<<num<<" is odd";
   return 0;
}

OUTPUT:

25 is odd
Sharing Is Caring

Leave a Comment