(Temperature Conversions) Write a program that converts integer Fahrenheit temperaturesfrom 0 to 212 degrees to floating-point Celsius temperatures with 3 digits of precision. Perform thecalculation using the formulacelsius = 5.0 / 9.0 * (fahrenheit - 32);The output should be printed in two right-justified columns of 10 characters each, and the Celsiustemperatures should be preceded by a sign for both positive and negative values.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.2: Formatting Numbers For Program Output
Problem 5E
icon
Related questions
Question

(Temperature Conversions) Write a program that converts integer Fahrenheit temperatures
from 0 to 212 degrees to floating-point Celsius temperatures with 3 digits of precision. Perform the
calculation using the formula
celsius = 5.0 / 9.0 * (fahrenheit - 32);
The output should be printed in two right-justified columns of 10 characters each, and the Celsius
temperatures should be preceded by a sign for both positive and negative values.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Literals
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning