Question: Write a program that gets the number and a letter. If the letter is f, the program should treat the number entered as temperature in

Write a program that gets the number and a letter. If the letter is f, the program should treat the number entered as temperature in degrees Celsius and convert it into the temperature in degree Fahrenheit and print a suitable message. If the letter is c, the program should consider the number as Fahrenheit temperature and convert it to Celsius temperature and print a suitable message. The program should display error message and then exit if the user enters any other letter. Use c++ language to implement this program. [Marks = 10] Formulas: Celsius to Fahrenheit: 9.0/5.0 * value + 32 Fahrenheit to Celsius: 5.0/9.0 * (value-32) Note: Do this using Switch statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!