this is my current code:
#include <iostream>
using namespace std;
void celsius(double);
//Main
int main()
{
cout << "Now displaying the first 20 fahrenheit temperatures and\n"
<< "showing the Celsius equivalent.\n";
//Loop for displaying the table
for (int couter = 0; couter <= 20; couter++)
celsius(couter);
return 0;
}
//calculates and displays the celsius equivalent
void celsius(double fahren)
{
double celsi;
celsi = (5/9) * (fahren -32);
cout << fahren << "\t\t" << celsi << "\n";
}
What im getting as an output is this:
Now displaying the first 20 fahrenheit temperatures and
showing the Celsius equivalent.
0 -0
1 -0
2 -0
3 -0
4 -0
5 -0
6 -0
7 -0
8 -0
9 -0
10 -0
11 -0
12 -0
13 -0
14 -0
15 -0
16 -0
17 -0
18 -0
19 -0
20 -0
What im looking to get is the correct value of celsius and not the string of "-0"
any ideas?