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

C++ program, Receive 3 numbers and display them in ascending order from sma...

Receive 3 numbers and display them in ascending order from smallest to largest ed#

Android - iphone mobile game, I am seeking a developer to create a mobile g...

I am seeking a developer to create a mobile game for me. I want an endless runner game with simple controls. The game needs to be a 3D game in a 2D view. The graphics and animation

Subrotine assembly language, You have to write a subroutine (assembly langu...

You have to write a subroutine (assembly language code using NASM) for the following equation.

What is scope resolution operator, Scope Resolution operator: The scope...

Scope Resolution operator: The scope resolution operator: : is used to access global variable in the inner block. When global and local variable are identical name the scope re

Basic Programming Constructs, Write a program to print all the factors of a...

Write a program to print all the factors of a positive integer A

Program to calculate pie, This problem familiarizes you with using random n...

This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi

Stack, write a program in c language to implement stacks in a single array

write a program in c language to implement stacks in a single array

Program is to define a class as employee, Program is to define a class as e...

Program is to define a class as employee: Write a program to define a class as employee and collect information about them by using classes and object class employee   {

Decision control instruction, if age of ram,shayam and ajay are input throu...

if age of ram,shayam and ajay are input through keyboard,write a program to determine the youngest of the three.

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