Link to home
Start Free TrialLog in
Avatar of mustish1
mustish1

asked on

Syntax Error

Hi guys: Can any one please tell me why it gives syntax error on that line ? Thanks.
      celsustempValue = calcSensus(getFahrcalcvalue);

--------------------------------------------

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main()
{
      double getFahrcalcvalue = 0.00;
      double celsustempValue = 0.00;
      double calcFahr()
            {
                        double FarTemp
                        cout << "Enter Fahrenheit temperature==>";
                        cin >> FarTemp;
                        return(FarTemp);
                  }
      double calcSensus(double CencTemp)
            {
                        double FarTempValue = 0.00;
                        FarTempValue = CencTemp;
                        CencTemp = 50 / 9.0 * (FarTempValue -32.0);
                        return(CencTemp);
                  }

      getFahrcalcvalue = calcFahr();
      celsustempValue = calcSensus(getFahrcalcvalue);
      cout << "Celsius temperature==>" << celsustempValue << endl;
      system("pause");
      return 0;
}  
SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, it's 5/9 not 50/9.
And you don't need the () on the return.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phoffric
phoffric

Factor of 10 off:
CencTemp = 50 / 9.0 * (FarTempValue -32.0);

Open in new window

Try:
CencTemp = 5/ 9.0 * (FarTempValue -32.0);

Open in new window

Avatar of mustish1

ASKER

Thanks to every body.