Question: Your program creates a dynamically allocated array for storing temperatures in degrees celsius as follows: double *temps; int n =1; cin >> n; temps= new

Your program creates a dynamically allocated array for storing temperatures in degrees celsius as follows:

double *temps; int n =1; cin >> n; temps= new double [n]; 

So that the pointer variable temps (temperature) is pointing to the dynamically allocated array. Write code to fill this array with n numbers typed in at the keyboard. The temperature T in degrees Fahrenheit (F) is equal to the temperature T in degrees Celsius (C) times 9/5 plus 32.

Tf = 32 + Tc*9/5 

Write additional code to take this initial values in degrees Celsius and convert the temperatures to degrees Fahrenheit and print out the values.

For example with input

5 42 36 12 7 10 

Your output should be like

107.6 96.8 53.6 44.6 50 

Note space and newline at end of output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!