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 run C++ program in cmd

0 Answers  


How will you print a list of all unique words from a string which may contain repeated words?

0 Answers   Adobe,


write a program To generate the Fibonacci Series.

0 Answers   Accenture,


Write a program to read the values a, b and c and display x, where x=a/b–c. Test the program for the following values: (a) a = 250, b = 85, c = 25 (b) a = 300, b = 70, c = 70

1 Answers  


How to reverse a string in C++

0 Answers  


Tell How To Check Whether A Linked List Is Circular ?

1 Answers   IBS, Infosys,


Discuss the role of C++ shorthands.

0 Answers   Adobe,


How many times will this loop execute? Explain your answer.

0 Answers  


What are the advantages/disadvantages of using inline and const?

0 Answers   Amazon,


What is function overloading and operator overloading in C++?

0 Answers   IBS, TCS,


Is deconstructor overloading possible? If yes then explain and if no Then why?

1 Answers  


What is a COPY CONSTRUCTOR and when is it called?

0 Answers   IBS,


Categories