take a temperature and convert it into fahrenheit or celsius
double convert_ctof(double c) { //convert celsius to fahrenheit return c * (9.0/5.0) + 32; } double convert_ftoc(double f) { //convert fahrenheit to celsius return (f - 32) * (5.0/9.0); } int main() { double x; cout << "Please enter a temperature in Celsius: "; cin >> x; cout << "The equivalent Fahrenheit temperature is: " << convert_ctof(x) << endl; cout << "Please enter a temperature in Fahrenheit: "; cin >> x; cout << "The equivalent Celsius temperature is: " << convert_ftoc(x) << endl; return 0; }