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
Create a function ValueDelta(char inName[], char outName[]) that reads a text file with option specifications and writes the option values as well as Delta. The inName[] file conta

Suppose we use Lists to represent a movie which has a title, cast and year. For example, the following list represents the movie, "Die Hardly", with the cast "Bruce Willing" and "T

A: this is a procedure during exception handling while the destructor is called for all local objects in the stack among the place where the exception was thrown & where this is ca

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Project Description: Prepare software that will work with our USB hardware that easily lets you backup all the pictures in your computer into the USB stick in one single step. Once

To develop a web crawler such that when given a base URL, it will traverse the entire web tree and then build an index of keywords and what URL link they appear on.   The web crawl

color representation 0,1,2,3,4,5,6,7...

how yo use the friend function?

Example for external storage class - computer programming? extern double sin (double); In a function prototype, for the sin() function its function definition ~ we can write

What does ODBC do in context with PHP? PHP supports many databases such as dBase, Microsoft SQL Server, Oracle, etc. however, it also supports databases such as filePro, FrontB