For your first assignment, you wrote a program to convert Celsius temperatures to Fahrenheit so American companies could sell foreign-made thermometers in the U.S. You've now been hired by a small start-up company with a better idea: Instead of building electronic interfaces for Celsius thermometers, they intend to sell the unmodified Celsius thermometers and include a conversion table on paper.
Your assignment is to modify the code from assignment #1 so that it can do either a single conversion (as before), or print out a table of conversion data. Your program should start by asking the user which they would prefer (you can assume that they always answer with a legal input value -- a 1 or a 2). If they want a table, ask them for the lower and upper bounds on the Celsius temperatures and print a conversion for every 10 degrees. The table should consist of two columns of floating-point values. The distance between the columns isn't important, but the values within each column should line up vertically at the decimal point.
Here are some sample runs:
mote33[10] : a.out
Would you like to:
1) Convert a single temperature
2) Print a conversion table
Enter 1 or 2: 1
Enter Celsius Temperature: 100
Fahrenheit temperature is: 212.0
This is 0.0 degrees from boiling.
mote33[11] : a.out
Would you like to:
1) Convert a single temperature
2) Print a conversion table
Enter 1 or 2: 2
Enter starting Celsius value: 5
Enter ending Celsius value: 10
Celsius Fahrenheit
5.0 41.0
mote33[12] : a.out
Would you like to:
1) Convert a single temperature
2) Print a conversion table
Enter 1 or 2: 2
Enter starting Celsius value: 7
Enter ending Celsius value: 100
Celsius Fahrenheit
7.0 44.6
17.0 62.6
27.0 80.6
37.0 98.6
47.0 116.6
57.0 134.6
67.0 152.6
77.0 170.6
87.0 188.6
97.0 206.6
If you were unable to get the first assignment working, you may modify this code instead of your own.