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


Enter a number: 3


Enter a number: 99


Enter a number: 1


Enter a number: 0



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
A function f is defined by the rule that f(n) = n if 0≤n≤3 and f(n) = f(n - 1) + 2f(n - 2) + 3f(n - 3) if n> 3. (a) Write a procedure that computes f by means of a recursive pro

what is poiter

Describe problem with Runtime type identification? A: The run time kind identification comes at cost of performance penalty. Compiler maintains class.

C program to demonstrate Pointer to array: void p2a(int *); void main() {                 int x=10, *a,**b;                 int arr[5];                 a=&x;//po

A: #include // Test to see if pointer hopping is worthwhile. // strlen implemented with usual indexing mechanism. int strlen1( const char str[ ] ) { int i; for( i =

Define  T y pe c o m p a t i b i li t y? T o a s s i g n i n t t o s m a l l i n t t h e v a r i a b l e should b e

#questi An array of n numbers is given, where n is an even number. The maximum as well as minimum of these given numbers need to be determined. Which of the following is true about

Changing Field width The printf() and scanf() functions from the standard library, use width specifier for controlling the width of its output . Similarly, the ostream class al

replace character into string and return value of string that are replaced

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and 6: