#include // file: tfuncts.cc // Functions that return values // convert between Celsius and Fahrenheit (revised) double FtoC(double tempFahr) { return (tempFahr+40.0)*5.0/9.0 - 40.0; } double CtoF(double tempCels) { return (tempCels+40.0)*9.0/5.0 - 40.0; } int main() { double Cels, Fahr; cout << "Enter a Fahrenheit temperature: "; cin >> Fahr; cout << "That converts to " << FtoC(Fahr) << " Celsius." << endl; cout << "Enter a Celsius temperature: "; cin >> Cels; cout << "That converts to " << CtoF(Cels) << " Fahrenheit." << endl; return 0; } Sample output: < tfuncts >