Question: i'm using a text editor Exercise of If-Then-Else Statment: Get a copy of the convert.cpp file by: o Entering the cp command in hercules: cp

Exercise of If-Then-Else Statment: Get a copy of the convert.cpp file by: o Entering the cp command in hercules: cp et/data/ftp/pub/class/110/ftp/cpp/if/convert.cpp convert.cpp o or, using your mouse to copy and paste the program into Nano text editor or Visual C++. This program demonstrates how to use if-else statement. Test the program with these inputs: c 100 F 32 c0 fo d0 Explain to yourself: o Why do the last three sets of the input values yield the same output? o Why isn't c the same as C? . Why would you type any number after d even though d is not a known conversion type? . You should use two if-else structures to fix the program: o One will validate the letter as soon as it is typed: If the input letter is not C, C, F, or f, output "wrong letter". then use an else to skip the rest of the program (do not ask for temperature, do not print result) Do not return early. o The other will choose what conversion to use. Make sure to treat (C 100) and (c 100) the same, and treat (F 32) and (f 32) the same; 1/1 Program Convert converts a temperature in Fahrenheit to // Celsius or a temperature in Celsius to Fahrenheit // depending on whether the user enters an F or a c.. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
