C++ using Visual Studios
Goals: Practicing simple ifs and 2-way branches and nested ifs. Problem: You are to create a program to aid in the conversion from Celsius to Fahrenheit and from Fahrenheit to Celsius the user to enter C or e when he she wants to convert from Celsius to our program should ask Fahrenheit and enter For fwhen heshe wants to convert from Fahrenheit to Celsius, Use a simple if (no else) to prompt the user to enter C,c, F, or F when he/she has entered another character (refer to the calculator demo program). Assume the user would not enter an incorrect character twice. Store the user's input as a single character, do not use a C-string or a string object Next your program should prompt the user to enter the temperature to be converted and employ a 2-way branch (if-else) to execute the conversion (one branch for when the user entered C or c Lab 2 CMPSC 201-Spring 2018 and another when the user entered F or f). Output the user's input and the coresponding temperature in the other scale. The formula for conversion are: C-5F-32) F-9/SC+32 Some sample runs are given below (user's input is show in bold characters. Enter C or c to convert from Celsius to Fahrenheit or Enter F or fto convert from Fahrenheit to Celsius. C Enter the temperature in Celsius you want to convert to Fahrenheit. 100 100 degrees Celsius corresponds to 212 degrees Fahrenhcit Enter C or e to convert from Celsius to Fahrenheit or Enter F or fto convert from Fahrenheit to Celsius e Enter the temperature in Celsius you want to convert to Fahrenbeit. 38 38 degrees Celsius corresponds to 100.4 degrees Fahrenheit. Enter C or c to convert from Celsius to Fahrenheit or Enter F or fto convert from Fahrenhcit to Celsius. F Enter the temperature in Fahrenheit you want to convert to Celsius.-40 40 degrees Fahrenheit comesponds to -40 degrees Celsius Enter C or c to convert from Celsius to Fahrenheit or Enter F or f to convert from Fahrenheit to Celsius f Enter the temperature in Fahrenheit you want to convert to Celsius. 73.5 73.5 degrees Fahrenheit corresponds to 23.0556 degrees Celsius. Enter C or e to convert from Celsius to Fahrenheit or Enter F or fto convert from Fahrenheit to Celsius. K You entered an incorrect choice Enter C or c to convert from Celsius to Fahrenheit or Enter F or fto convert from Fahrenheit to Celsius f Enter the temperature in Fahrenheit you want to convert to Celsius. 32 32 degrees Fahrenbeit corresponds to 0 degrees Celsius