Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this module, you learned about creating functions in C++ and how to combine functions with the concepts covered in previous modules to solve problems.

In this module, you learned about creating functions in C++ and how to combine functions with the concepts covered in previous modules to solve problems.

For this assignment you will create a program converting Fahrenheit temperatures to Celsius temperatures.

The formula for converting a temperature from Celsius to Fahrenheit is, multiply by 1.8 (or 9/5) and add 32.:

F = C x 1.8 + 32, where F is the Fahrenheit temperature and C is the Celsius temperature.

The formula for convert a temperature in degrees Fahrenheit to Celsius, subtract 32 and multiply by .5556 (or 5/9).

C = (F - 32) x .5556, where F is the Fahrenheit temperature and C is the Celsius temperature.

Write a function named fahrenheitconverter that accepts a Celsius temperature as an argument and returns the temperature converted to Fahrenheit.

Write a second function named celsiusconverter that accepts a Fahrenheit temperature as an argument and returns the temperature converted to Celsius.

Demonstrate the functions by accepting the different temperatures from a user and displaying the temperature converted to Fahrenheit and Celsius. Be sure to include comments throughout your code where appropriate.

Make sure the output formatting is appropriate for the values provide

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago