Question: // Program Convert converts a temperature in Fahrenheit to // Celsius or a temperature in Celsius to Fahrenheit // depending on whether the user enters

 // Program Convert converts a temperature in Fahrenheit to // Celsiusor a temperature in Celsius to Fahrenheit // depending on whether the

// 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 using namespace std; int main() { char letter; // Place to store input letter int tempIn; // Temperature to be converted int tempOut; // Converted temperature cout > letter; > tempIn; if (letter == 'C' || letter == 'c') { tempOut (9* tempIn / 5) + 32; } else { tempOut = 5 (tempin - 32) / 9; } cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!