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

Assignment Help:

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;

}


Related Discussions:- Program to check even and odd numbers

Explain class templates, Class Templates In addition to function  templ...

Class Templates In addition to function  templates, C++  also supports the  method of class templates. By definition, a class template is a class definition that explains a fam

Flowcharting., flowcharting of 3 quizes display the average

flowcharting of 3 quizes display the average

Assignment, Develop a C++ program that uses a while to determine the gross ...

Develop a C++ program that uses a while to determine the gross pay (in Dollars) for each of several employees. The company pays “straight-time” for the first 40 hours worked by ea

Develop a motion sensor in altera control, Develop a Motion sensor in Alter...

Develop a Motion sensor in Altera control Project Description: I want a project written in c using Altera eclipse development tool, that controls a motion sensor ( SRF05 ) fr

Input data analysis, Create a class Word, representing a word. Two words sh...

Create a class Word, representing a word. Two words should be considered equal if they consist of the same sequence of letters and we consider upper case and lower case as equal. F

Evaluate the credit worthiness of a client, Write a C++ program that can be...

Write a C++ program that can be used to evaluate the credit worthiness of a client. The program reads the credit limit and the price and quantity of the item to be purchased by the

What is a template in c++, Templates permit to create generic functions tha...

Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until

Write a program to compute the equation, Write a program to compute the fol...

Write a program to compute the following equation for values of time.           y = 2x+3   The values of time are stored in the file program.dat and the solution should be display

Why shouldn''t matrix class''s interface look like an array, Why shouldn't ...

Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd