C++ Program to check whether given number is even or odd [DEVCPP/GCC]


//Program to check whether given number is even or odd

#include<iostream>

using namespace std;

int main()
{
int num;

cout<<"ENTER THE NUMBER:";
cin>>num;

if(num%2==0)    
cout<<"NUMBER IS EVEN";
else
cout<<"NUMBER IS ODD";

return 0;

}

Share this

Related Posts

FIND US ON FACEBOOK!