Question: MUST BE IN C (NOT C++ or C Sharp) Write a program that can convert a temperature in degrees Kelvin to degrees Fahrenheit. The user

 MUST BE IN C (NOT C++ or C Sharp) Write a

program that can convert a temperature in degrees Kelvin to degrees Fahrenheit.

MUST BE IN C (NOT C++ or C Sharp)

Write a program that can convert a temperature in degrees Kelvin to degrees Fahrenheit. The user should be prompted to enter the temperature in degrees Kelvin and the program should print on the screen the temperature in degrees Fahrenheit. In 1708, (Gabriel) Daniel Fahrenheit (Germany: 1686-1736) adopted a fixed point scale of temperature. The Fahrenheit scale sets the zero at the freezing point of a salt-water mixture and 100 at approximately body temperature. In 1742, Anders Celsius (Sweden: 1701-1744) described a mercury thermometer that had the zero of the scale set at the freezing point of pure water and 100 degrees set at the boiling point of pure water. The Celsius system is sometimes referred to as the centigrade system. The Kelvin scale, named after Lord Kelvin (William Thomson) (Scotland: 1824-1907), sets zero at the absolute zero of temperature (at which the motions of atoms and molecules practically stops) and uses degrees that are the same size as the Celsius system. The Kelvin scale is related to the Celsius scale by the following relation: TK = TC + 273.2 where TK is the temperature in Kelvin and TC is the temperature in C. The Celsius scale is related to the Fahrenheit scale by: TF = ( TC * 9/5) + 32 where TF is in F. The following table provides test cases that provides test cases that can be used for verifying your program and testing the software Temperature Kelvin (TK) (input) Temperature Celsius (TC) (TK - 273.2) Temperature Fahrenheit (TF) (TC * 9/5 + 32) 0 -273.20 250 -23.20 -459.76 -9.76 80.24 300 26.80 126.80 400 260.24 1000 726.80 1,340.24 . The main function: Local Variables degreek: for containing the Kelvin temperature. degreeF: to contain the Fahrenheit temperature. Logic Prompt the user for a temperature in Kelvin with Please enter a temperature in degrees Kelvin." Read the value typed at the keyboard into the variable degreek Call the function convertKtor() to convert a value in Kelvin to Fahrenheit. Display the results with a message of the following form: "Kelvin: 300 Fahrenheit: 80.24" The function convertKtoF Parameters degreeK: to receive the value of a temperature in Kelvin. Local Variables degreec: for computing the temperature in Celsius. degreeF: for computing the temperature in Fahrenheit. Return Value: The value of the temperature in degrees Fahrenheit. Logic Calculate the Celsius temperature and store its value in degreeC using: TC = TK - 273.2 Calculate the Fahrenheit temperature and store its value in degreeF using: TF = (TC * 9/5) + 32 Return the value in degreeF. 0

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!