Assignment: #tempconverter Due: 03/04/2017 Points: 3

Specification

Part 0

Output a prompt using the cerr object that instructs the user to type in a temperature in °F (i.e. Fahrenheit).

Define a variable named tempF of type int.

Read the input into the tempF variable using the cin object.

   cin >> tempF;

Define a variable named tempK of type double.

Convert the °F value to Kelvin using the following arithmetic expression storing the result of the expression in the tempK variable.

   (tempF + 459.67) * 5 ÷ 9

Use the cout object to print the following output.

   tempF degree Fahrenheit in Kelvin is tempK

Example output when the input is 72.

   72 degree Fahrenheit in Kelvin is 295.372

Be sure to end the output of this part with a newline.

Part I

Insert the following statement into your program.

   cout << 5/9 << endl;

Using only one cout statement, print a short explanation as to why the previous cout statement printed the value 0 (zero).

   cout << "5/9 prints 0 because ..." << endl;