Write a program that takes as input a depth in kilometers


Question: Write a program that takes as input a depth (in kilometers) inside the earth and displays the temperature at this depth in degrees Celsius and in degrees Fahrenheit. The relevant formula is

C=10d+20

Where C is the temperature in degrees Celsius and d is the depth in kilometers (a positive number). The temperature in degrees Fahrenheit is given by F=(9/5)C+32

Your program should include two functions. Function celsius_at_depth should compute and return the Celsius temperature at a depth given in kilometers. Function fahrenheit should convert a Celsius temperature to Fahrenheit.

Your program should interact with the user in exactly this manner:

Enter depth in kilometers=> 15.4

The temperature is 174.0 degrees C or 345.2 degrees F.

Can you write this program in c language? Define every function.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that takes as input a depth in kilometers
Reference No:- TGS0947086

Expected delivery within 24 Hours