Returning values from a separate function in C++? : <p>I am doing a programming assignment in my CS class using C++ that is giving me problems. The assignment is to write a program that asks the user to input a Fahrenheit temperature. The program must then output the Celsius equivalent of that temperature and the Celsius equivalents of the next 20 Fahrenheit temperatures. This must all be done using a separate function to complete the conversion calculation as well as a function prototype. </p>

<p>I got everything to work except my Celsius outputs all show a value of 0. I cannot seem to find any errors or figure out what is wrong...Please Help!</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;iomanip&gt;

using namespace std;

double Celsius(double temp);

int main() {

double fTemp, cTemp;

cout &lt;&lt; "Please input a temperature in degrees Fahrenheit: ";
cin &gt;&gt; fTemp;

cout &lt;&lt; "F Temp" &lt;&lt; "       " &lt;&lt; "C Temp"&lt;&lt; endl;
cout &lt;&lt; "-------------------" &lt;&lt; endl;

for(int count=1; count&lt;= 20; count++){

    cTemp = Celsius(fTemp);

    cout &lt;&lt; setw(6) &lt;&lt; fTemp &lt;&lt; setw(12) &lt;&lt; cTemp&lt;&lt; endl;

    fTemp++;

}


return 0;
}

//*************Celsius Function****************//

double Celsius(double temp){

double newC;
newC = (temp-32) * (5/9);
return newC;

}
//************************************************
</code></pre>
