CJCoding With Joseph
15free / daySign inCreate account

Temperature Conversion

Create a float variable for Fahrenheit temperature with the value 98.6f. Convert it to Celsius using the formula: celsius = (fahrenheit - 32) * 5 / 9. Use cout with setprecision to display the output shown in Expected Output.

Both temperatures should be displayed with exactly 1 decimal place using fixed and setprecision(1). The conversion formula will give you 37.0 degrees Celsius.

Expected Output:

98.6°F = 37.0°C

= newline. No newline after the last line.

Hints3 available
Topics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.