Question
write,compile, and run a c++ program that accepts a number followed by one space and then a letter. if the letter following the number is
write,compile, and run a c++ program that accepts a number followed by one space and then a letter. if the letter following the number is f, the program is to treat the number entered as a temperature in degrees Fahrenheit, convert the number to the equivalent degrees celsius,and display a suitable message.if the letter following the number is c, the program is to treat the number entered as a temperature in degrees celsius, convert the number to the equivalent degrees Fahrenheit, and display a suitable message. if the letter is neither f nor c, the program is to display a message that the data entered is incorrect and then terminate. use an if-else chain in your program and make use of these conversion formulas: celsius = (5.0 / 9.0) x (Fahrenheit -32.0) Fahrenheit = (9.0/5.0) x celsius + 32.0.
need to run your program three times. Once for Fahrenheit and once for Celsius and once for an incorrect value.
please help!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started