Tuesday, 11 November 2014

Write a Cplusplus Program to Check if a given Integer is Odd or Even

Leave a Comment
Code-:

//Write a Cplusplus Program to Check if a given Integer is Odd or Even
#include<iostream>
using namespace std;
void main()
{
int number;
cout<<"Enter any number to determine whether odd or even = ";
cin>>number;
if(number%2==0)
{
cout<<"Even number ";
}
else
{
cout<<"Odd Number ";
}
system("pause");
}

Output-:

If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: