Using functions, develop a full C++ structured program that asks the user for his choics:1 or 2. If the choice is 1, then your program will convert the entered Fahrenheit (F°) temperature to Celsius (C°). If the choice is 2, then your program will convert the entered Celsius (C°) temperature to Fahrenheit (F°). use the following functions: - getTemp: read the temperature from the user - getChoice: read the user choice: 1 or 2 NOTE: only 1 or 2 are allowed, if not, then give an error message warning for three times, then exit the whole program with a message if the problem persists. - convertToF: converts Celsius to Fahrenheit F°= (9/5) * C° + 32 - convertToC: converts Fahrenheit to Celsius C°= (5/9) * (F° - 32)
Using functions, develop a full C++ structured program that asks the user for his
choics:1 or 2. If the choice is 1, then your program will convert the entered Fahrenheit
(F°) temperature to Celsius (C°). If the choice is 2, then your program will convert the
entered Celsius (C°) temperature to Fahrenheit (F°). use the following functions:
- getTemp: read the temperature from the user
- getChoice: read the user choice: 1 or 2
NOTE: only 1 or 2 are allowed, if not, then give an
error message warning for three times, then exit the whole
program with a message if the problem persists.
- convertToF: converts Celsius to Fahrenheit F°= (9/5) * C° + 32
- convertToC: converts Fahrenheit to Celsius C°= (5/9) * (F° - 32)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images