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

How to invoke a C function using a C++ program?

0 Answers   Alter,


Explain encapsulation in C++.

0 Answers   Verifone,


Write a program that ask for user input from 5 to 9 then calculate the average

0 Answers   IBS,


In C++ what do you mean by Inheritance?

0 Answers   Accenture,


What do you know about Volatile keyword in C++? Explain with an example code.

0 Answers   Adobe,


In C++ what is a vtable and how does it work?

0 Answers   Agilent,


Write a C++ Program to Check Whether a character is Vowel or Consonant.

2 Answers  


What is conversion constructor in C++

0 Answers   TCS,


Write a program to generate the Fibonocci Series in C++.

0 Answers   Accenture,


What is the purpose of a constructor? Destructor?

0 Answers   Amazon,


In C++ what is the meaning of data hiding?

0 Answers   Aricent,


Define type casting in C++.

0 Answers   Amdocs,


Categories