Converting from fahrenheit to celcius problem.
Posted: Wed Sep 15, 2004 1:50 pm
I'm having some problems when converting from celcius to fahrenheit.
When I input 22 celcius it gives back 71. Think that is correct.
But when I try to convert 71 fahrenheit to celcius it returns 21 instead of 22. Could anyone help me with this?
When I input 22 celcius it gives back 71. Think that is correct.
But when I try to convert 71 fahrenheit to celcius it returns 21 instead of 22. Could anyone help me with this?
Code: Select all
Procedure.l celcius2fahrenheit(in.l)
Result.l = (in.l * 9/5) + 32
ProcedureReturn Result.l
EndProcedure
Procedure.l fahrenheit2celcius(in.l)
Result.l = (in.l-32) * 5/9
ProcedureReturn Result.l
EndProcedure
Debug celcius2fahrenheit(22)
Debug fahrenheit2celcius(71)