Odd even program, C/C++ Programming

Write a program called OddEven that will prompt the user for an integer and print/display a message indicating whether it is even or odd. Continue prompting for numbers from the user and displaying odd/even until the user enters 0. When 0 is entered, exit the loop and display "Goodbye".

Sample Run:

Enter a number: 4

Even

Enter a number: 3

Odd

Enter a number: 99

Odd

Enter a number: 1

Odd

Enter a number: 0

Even

Goodbye!

Posted Date: 3/19/2013 5:16:51 AM | Location : United States







Related Discussions:- Odd even program, Assignment Help, Ask Question on Odd even program, Get Answer, Expert's Help, Odd even program Discussions

Write discussion on Odd even program
Your posts are moderated
Related Questions
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

in this problem you are given a board in which some of the elements are placed..each element represent ancolor.fill the other elements in the board such that none of the adjacent e

A palindrome is a string that reads the same from the both the ends. Given a string S convert it to a palindrome by doing character replacement. Your takes is to convert S to palin

The Scope Resolution Operator( :: ) Global variables are explained outside any functions and thus can be used by all the functions defined thereafter. However, if a global vari

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

The probabilistic Hough transform uses random sampling instead of an accumulator array. In this approach the number of random samples r, is not specified in the OpenCV call, but is

Using a Friend Using a friend function is quite easy. The following example explains a friend function to access members of two classes. class Bclass;

Write a function that takes in a number n and divides the screen into n vertical bars, alternating black and white. (What should you do if someone puts in n=0 or n=-99?)

F r i e n dly Function: A class can have public members and private members.   The public member can be used through the class using dot operator.   Where as private me