menu driven program c++

Job ID: 34749994

Budget: $30 – $250 USD

Write a program that performs following tasks: (A menu driven program is preferable)

1. Ask a user to enter two integers and store them in two integer variables, say a and b. Then use a for loop statement to display the 3rd power of all the numbers between a and b with a and b included. For example, if a user enter 2 and 5, then the program should display

8

27

64

125

-------------------------------------------------------------------------

2. Use a for loop statement to produce and display a table of temperature conversions between Celsius and Fahrenheit:

===============================

Celsius Fahrenheit

===============================

0 32

10 50

20 68

30 86

40 104

50 122

60 140

===============================

The formula for converting from Celsius to Fahrenheit is

fahrenheit = (9/5) * celsius + 32

Hint 1: If both numerator and denominator are integers, then integer division / will result in the integer part of the quotient. Thus 9/5 = 1, and will not correctly convert from Fahrenheit to Celsius. To correctly convert, you may need to write 9/5 as 9/5.0 in the statement, as long as one of the number is in decimal form, the devision operator / will result in a full decimal number.

Hint 2: To align the values correctly, please review setw() function
Related categories: C# Programming C++ Programming