Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2: If....... else if...... (nested if's) Exercise 1: Write a C++ program that reads a number followed by one space and then a letter.

image text in transcribed

Part 2: If....... else if...... (nested if's) Exercise 1: Write a C++ program that reads a number followed by one space and then a letter. If the letter following the number is f, the program should treat the entered number as a temperature in Fahrenheit, convert the number to the equivalent Celsius temperature and print a suitable display message. If the letter following the number is c the program should perform the opposite conversion (from Celsius to Fahrenheit). If the letter is neither f nor c the program should print a message that the data entered is incorrect and terminate. Use the following formulas for converting between Fahrenheit and Celsius: Celsius = 2 + (f 32) 9 Fahrenheit = *c+32 Use two digits after the decimal point when displaying the converted temperature. C\Users\medhatha documents visual studio 2010 Projects by Debugvliexe please enter the temperature followed by character for C 33 f the temperature in Celsuis -0.555556 Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

Organize and support your main points

Answered: 1 week ago

Question

What is management growth? What are its factors

Answered: 1 week ago