Infolinks - Earn Easy Money

Saturday, April 4, 2015

C++ Program to find the given number is Even or Odd

#include <iostream>
using namespace std;
int main ( )
{
int a;
int b;
cout<<" ENTER YOUR NUMBER \n";
cin>> a;
if (a%2==0)
{
cout<<" GIVEN NUMBER IS EVEN ";
}
else
{
cout<<" GIVEN NUMBER IS ODD \n";
}
return 0;
}

No comments:

Post a Comment

Must drop your comments about post.