#include #include // a program to convert Celsius to Fahrenheit int main() { const int MAXCELSIUS = 50; const int STARTVAL = 5; const int STEPSIZE = 5; int celsius; float fahren; cout << endl; // print a blank line cout << "DEGREES DEGREES\n" << "CELSIUS FAHRENHEIT\n" << "------- ----------\n"; celsius = STARTVAL; // set output formats for floating point numbers cout << setiosflags(ios::showpoint) << setprecision(2); while (celsius <= MAXCELSIUS) { fahren = (9.0/5.0) * celsius + 32.0; cout << setw(4) << celsius << setw(13) << fahren << endl; celsius = celsius + STEPSIZE; } return 0; }