Assignment C

For each problem:

Problem C1

Create a program that asks the user for a temperature in Celsius, computes the corresponding temperature in Fahrenheit, and then prints the temperature in Celsius and Fahrenheit.

To convert from Celsius to Fahrenheit use the mathmetical formula:

  
      Fahrenheit  =  Celsius  *  9/5  +  32
    

Use named constants; do not put numbers down in the code.
You need to include the iostream and iomanip libraries.
The execution result should have three lines each time the program is run:

  1. The input line
  2. Celsius: followed by the value from the input, with one decimal position.
  3. Fahrenheit: followed by the value converted from the input, with one decimal position.

Test data, run the program three times:
First test input 37.778 degrees Celsius
Second test input -40 degrees Celsius
Third test input 0 degrees Celsius

Problem C2

Get a random integer using rand() and use the modulo operator with a range beginning with zero and stopping before 10.
Print the number and its square root on one line of output.
Copy and paste the code to process a second random number.
Copy and paste the code to process a third random number.