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");
}
//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-:
0 Questions:
Post a Comment