Program to check even and odd numbers, C/C++ Programming

Program to check even and odd numbers:

int main()

{

                int  your_number;

                cout << "Enter a whole number: ";

                cin >> your_number;

 

                if (your_number % 2 == 0)

                   cout << "Your number is even\n";

                else

        {

                  cout << "Your number is odd.\n";

                }

cout << "That's all!\n";

return 0;

}

Posted Date: 10/18/2012 8:00:27 AM | Location : United States







Related Discussions:- Program to check even and odd numbers, Assignment Help, Ask Question on Program to check even and odd numbers, Get Answer, Expert's Help, Program to check even and odd numbers Discussions

Write discussion on Program to check even and odd numbers
Your posts are moderated
Related Questions
To implement a back account system for new users

Q: What are User Defined data types? C supports an extraordinary feature known as "type definition" that permits users to define an identifier that would represent an existing

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Program is to replace every occurrence of in a string: Program is to replace every occurrence of c1 in string with c2 and have function return the no. of replacement int re

what is the purpose of pointer ? what is the syntax? how it works?

THIS PROGRAM IS TO DISPLAY A STOCK CONTAINING ITEM CODE,ITEM NAME,PRICE AND ANOTHER STOCK WITH CODE & QUANTITY AND DISPLAY COMPLETE INFORMATION #include #include #include


MAT LAB programming Project Description: Just for who are PROFESSIONAL IN MATLAB i have simulation and i would like to simulate the equation in ,and test the all simulatio

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4