Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a C++ Program to Find whether given Number is Odd or Even.



Write a C++ Program to Find whether given Number is Odd or Even...

Answer / hr

Solution:
/* C++ Program to Find whether given Number is Odd or Even */
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter any positive number :: ";
cin>>a;
if(a%2==0)
{
cout<<"
The Entered Number [ "<<a<<" ] is EVEN Number.
";
}
else
{
cout<<"
The Entered Number [ "<<a<<" ] is ODD Number.
";
}
return 0;
}
Output:
/* C++ Program to Find whether given Number is Odd or Even */
Enter any positive number :: 1327
The Entered Number [ 1327 ] is ODD Number.
Process returned 0

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

What kind of problems does name mangling cause?

0 Answers   Amazon,


Write a program to read two numbers from the keyboard and display the larger value on the screen

1 Answers  


Write a program that can take input from 3 to 8 and calculate the average?

0 Answers   Accenture,


dynamic scoping is

0 Answers   Siemens,


What is bool in C++

0 Answers  


Tell us the size of a float variable.

0 Answers   Accenture,


Tell me about virtual function

1 Answers  


explain the term 'resource acquisition is initialization'?

0 Answers   Amazon,


Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?

0 Answers   Adobe,


Briefly explain various access specifiers in C++.

0 Answers   Amdocs,


Consider the following C++ program

0 Answers  


what do you mean by exception handling in C++?

0 Answers   Alter,


Categories