Converting celsius to Fahrenheit or vice versa

Please help! These are the instructions:

Start by writing a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is F = (9/5)C + 32 where F is the Fahrenheit temperature and C is the Celsius temperature. Enhance the program by allowing the user to choose between converting from Celsius to Fahrenheit and vice versa. See the below output. You will need to look up the formula for the other directions (simply google it!). Allow for both upper and lower-case menu item selections and generate an appropriate error message if the user enters something unexpected. Format your output to always show one decimal.

The output should look something like this:
Enter c (or C) to convert Fahrenheit to Celsius
or f (or F) to convert Celsius to Fahrenheit: c

Enter the temperature: 0.0
0.0 Celsius is 32.0 degrees Fahrenheit.

Running the program again:
Enter c (or C) to convert Fahrenheit to Celsius
or f (or F) to convert Celsius to Fahrenheit: F

Enter the temperature: 212
212.0 Fahrenheit is 100.0 degrees Celsius.
And so what is your question ?
rules prevent us from doing homework so I assume you have some code already to show
This is all I have so far
#include <iostream>
using namespace std;

int main() {
float choice, Celsius, Fahrenheit;

cout << "Enter c (or C) to convert Fahrenheit to Celsius or f (or F) to convert Celsius to Fahrenheit: \n";
cin >> choice;
if (choice == c || C)
Fahrenheit = (9/5) * Celsius + 32;


return 0;
}
Topic archived. No new replies allowed.