Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem C1 Create a program that asks the user for a temperature in Celsius, computes the corresponding temperature in Fahrenheit, and then prints the temperature

Problem C1

Create a program that asks the user for a temperature in Celsius, computes the corresponding temperature in Fahrenheit, and then prints the temperature in Celsius and Fahrenheit.

To convert from Celsius to Fahrenheit use the mathmetical formula:

 Fahrenheit = Celsius * 9/5 + 32 

Use named constants; do not put numbers down in the code. You need to include the iostream and iomanip libraries. The execution result should have three lines each time the program is run:

1. The input line

2. Celsius: followed by the value from the input, with one decimal position.

3. Fahrenheit: followed by the value converted from the input, with one decimal position.

Align the decimal points for the two lines that print the Celsius and Fahrenheit temperatures.

Test data, run the program three times: First test input 37.778 degrees Celsius Second test input -40 degrees Celsius Third test input 0 degrees Celsius

* I use codelab(C++)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL Crash Course A Hands On Introduction To Database Development

Authors: Rick Silva

1st Edition

1718503008, 978-1718503007

More Books

Students also viewed these Databases questions