Question: Type a program in C++ that accepts a number followed by a space and then a letter. If the letter following the number is f,
Type a program in C++ that accepts a number followed by a space and then a letter. If the letter following the number is f, the program will treat the number entered as a temperature in degrees Fahrenheit, convert the number to the equivalent Degrees Celsius, and display an appropriate message. If the letter following the number is the program will treat the number entered as a temperature in Celsius, convert the number to the equivalent Fahrenheit degrees, and display an appropriate message. If the letter is not for c, the program will print the message that the data entered is incorrect and will terminate. Use an if-else string in your program and use the conversion formulas: Celsius = (5.0/9.0) (Fahrenheit - 32.0) Fahrenheit = (9.0/5.0) * Celsius +32.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
