Friday, 2 November 2012

Check Number is Even or Odd


#include <iostream>
using namespace std;
int main(){
int number;
cout << "Enter any number: ";
cin >> number;
if(number%2==0)
cout << "The given number is even." << endl;
else
cout << "The given number is odd." << endl;
return 0;
}

No comments:

Post a Comment