#include <iostream>
#include <iomanip>
using namespace std;
void celsius(int);
int main()
{
cout << setprecision(2) << fixed << showpoint;
cout << "This program displays a table of the Fahrenheit temperatures"
<< "\n0 thorugh 20 and their celsius equivalents.\n";
celsius(0);
return 0;
}
void celsius(int fahr)
{ double cels;
cout << "Fahrenheit \t \t Celsius\n";
for (fahr; fahr <= 20; fahr++)
{ cels = (5.0 / 9.0 )*(fahr - 32);
cout << fahr << "\t" << "\t"<< "\t " << cels << endl;
}
}
The question is
"Write a function named celsius that accepts a Fahrenheir temperature as an argument. The function should return the temperature, converted to celsius. Demonstrate the function by calling a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their celsius equivelents."
It sounds like to me that I just need the function to form the celsius degree, and that it should be displayed in the main function and not the void function like I have it above.