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

d) a "static destructor" is a static member function of the class which accepts one argument - a pointer to the object of that class to be cracked. It is probably utilized along wi

Write a c++ program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points c

Can I drop the [] while deleteing array of some built-in type (char, int, etc)? A: No. you can't Sometimes programmers think that the [] in the delete[] p only present so the

Prepare an Application in C# or C++ Project Description: We are seeking someone who can write a program in C# or C++. The idea is to prepare the program using a Cross Plat

Create a C language code, only one program, to implement the following task. Task: Write C code for a program that implements a digital clock (HH:MM:SS). The clock inclu

To implement a back account system for new users

Memory management by c program: Write a program to memory management in c program unsigned max( unsigned, unsigned );   int BaseMemBlocks::allocBlock( size_t sz )

flowcharting of 3 quizes display the average

Explain the  bit fields portable or not? - No, Bit fields aren't portable. - As Bit fields can't span machine words and number of bits in a machine word is different on diff