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. …………………………………………………………………………………………………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
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. …………………………………………………………………………………………………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
Chapter4: Making Decisions
Section: Chapter Questions
Problem 5E: a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered...
Related questions
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 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. …………………………………………………………………………………………………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.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning