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

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
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...
icon
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
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning