[SOLVED] SOLVED:a program that converts temperatures between Fahrenheit and Celsius

15.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Write a program to converts temperatures between Fahrenheit and Celsius. Your program should print a brief message describing what it does, and then prompt the user to enter “1” if they would like to convert a Fahrenheit number to Celsius, or “2” to convert a Celsius number to Fahrenheit. Then, allow the user to enter the number to be converted. Your program should call a function to perform the conversion and display the resulting value to the screen.Helpful Hints:C= (5.0/9.0 * (F-32)); C = temperature in degrees Celsius, F = temperature in degrees FahrenheitF= (9.0/5.0 * C+32); C = temperature in degrees Celsius, F = temperature in degrees FahrenheitWhen you integer division, the result is always an integer so all decimal numbers are truncated and not rounded. For example, 5/6=0 when it comes to integers. Keep this in mind when doing your conversions. Also, order of operations count!

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.