can someone help me i can't seem to find my temperature problem
/****************************
* functions
*****************************/
float c2F(float);
float f2C(float);
/****************************
* gloabal variables
*****************************/
int main ()
{
float inTemp;
float newTemp;
char inCode;
cout << "please enter the code (a 'C' of 'F'): ";
cin >> inCode;
cout << "please enter the tempature to be converted: ";
cin >> inTemp;
if (inCode == 'C')
{
newTemp = c2F(inTemp);
cout << "converted temp is " << newTemp << "\n";
}
else if (inCode == 'F')
{
newTemp = f2C(inTemp);
cout << "converted temp is " << newTemp << "\n";
}
else
{
newTemp = 0;
cout << "bad code entered\n";
}
system("pause");
return 0;
}
/****************************
* converts a temp from F->C using the formula F=5/9(C-32)
*****************************/
float f2C (float inTemp)
{
float newTemp = 5/9* (inTemp-32);
return newTemp;
}
/****************************
* converts a temp from C->F the formula C=9/9(F) +32
*****************************/
float c2F (float inTemp)
{
float newTemp = 9/5* inTemp+32;
return newTemp;
}