Functions - combined mathematical equation not working

Hi All.
My function below doesn't work as I want. I think (?) the problem is with the part that reads...
DegCelciusValue = (DegFarenheightValue-32)/(9/5);
The serial monitor gives a value of "180", so the DegFarenheightValue-32 bit is done
but the remaining /(9/5) bit gets ignored. I can't figure out why.

I've also tried using additional more specific brackets e.g. ((DegFarenheightValue-32)/(9/5))"
and this also (in case it was returning immediately after the variable got a value)

float ThisIsAUserCreatedFunction(float DegFarenheightValue){
float DegCelciusValue;
float TempDegCelciusValue;
TempDegCelciusValue = (DegFarenheightValue-32)/(9/5);
DegCelciusValue = TempDegCelciusValue;
return DegCelciusValue;
}

Can anyone help??
Here's my original code:

float DegFarenheightValue = 212;

float ThisIsAUserCreatedFunction(float DegFarenheightValue){
float DegCelciusValue;
DegCelciusValue = (DegFarenheightValue-32)/(9/5);
// DegCelciusValue = DegCelciusValue/(9/5);
return DegCelciusValue;
}

void setup() {
Serial.begin(115200);

}  // End of void.setup() bracket

void loop() {
//  delay(1000);

float DegC_Value = ThisIsAUserCreatedFunction (DegFarenheightValue);  // calling the function

Serial.print(DegFarenheightValue);
Serial.print(" degrees F is equal to ");
Serial.print(DegC_Value);
Serial.print(" degrees Celcius");
Serial.println();
delay(1500);
}
float convertFtoC(float tempF){
  return (tempF - 32.0) / 1.8;
}
DegCelciusValue = (DegFarenheightValue-32)/(9/5);

(9/5) = 1 is that what you want?

9/5 equals 1, while 9./5. equals 1.8. Read more about how to mix floats and ints. Divisions are tricky.

Thanks all for your incredibly fast and useful help. :slight_smile:
From what you've all said, I wrote
TempDegCelciusValue = (DegFarenheightValue-32)/(9.0/5.0);
and it works.
How could I have known this in advance? (to avoid similar problems in the future?)
Thanks again :slight_smile:

learn the language (C/C++)