Assignment F

Use the lab instructions given on the Internet at http://voyager.deanza.edu/~oldham
Use the same format for the opening comments as in assignment A, with your name, course and quarter, assignment, problem, and short problem description.
Type a program, as described in the following description. Compile it, correct any errors and execute it.
Copy the execution results into an   /* Execution Results:   comment.
Print the completed program with the execution results from within the Interactive Development Environment.
Always use memory constants when constant values are needed, except numbers such as 0 or 1 can be used in the code where their use is clear.

Additional requirement:
In these problems, and all future problems, use functions.
Provide a function prototype for each function before the main function.
The function prototype should have descriptive names for the function and for each parameter.
Put very little code in the main function.
Each function should be preceded with a short comment giving:

Problem F1

Write two functions:
A function named sum which takes two integer values as arguments, and returns their sum.
A main function which asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.
The main function then again asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.

Test it once, with the values 3 and 4, and then 5 and 49.

Problem F2

Write a program that has 4 functions.
The main() function shall call the other three functions.
The first function shall obtain the temperature from the user in degrees Fahrenheit.
The second function shall convert the temperature in degrees Fahrenheit into degrees Rankine, degrees Celsius, and degrees Kelvin.
The third function shall print the temperature for all four scales.

Formulas for conversion are:
Fahrenheit to Celsius: C = ( F - 32 ) * 100 / 180
Fahrenheit to Rankine: R = ( F - 32 ) + 491.67
Celsius to Kelvin K = C + 273.16
where C, F, R, and K are corresponding temperatures for the 4 scales.

Use a memory constant for every constant.
Print the result with a precision of one tenth of a degree.

Test it four times, with input:
32 degrees Fahrenheit
70 degrees Fahrenheit
-40 degrees Fahrenheit
212 degrees Fahrenheit