Hi, I have two functions, one called CtoF and the other called FtoC. As you might expect, one function converts temperatures from Centigrade to Fahrenheit, the other from Fahrenheit to Centrigrade.
The formulas I need to be able to do the conversion are:
Tc = (5/9)*(Tf-32)
Tf = (9/5)*Tc+32
(Tc = temperature in degrees Celsius, Tf = temperature in degrees Fahrenheit)
I am looking to write the code so that you can check for invalid data and perform other actions before carrying out the conversion.
I know to get started, I will probably want to place a function declaration like
Function CtoF(sngFar As Single) As Single
End Function
But where do I go from here??
I would much appreciate the help
The formulas I need to be able to do the conversion are:
Tc = (5/9)*(Tf-32)
Tf = (9/5)*Tc+32
(Tc = temperature in degrees Celsius, Tf = temperature in degrees Fahrenheit)
I am looking to write the code so that you can check for invalid data and perform other actions before carrying out the conversion.
I know to get started, I will probably want to place a function declaration like
Function CtoF(sngFar As Single) As Single
End Function
But where do I go from here??
I would much appreciate the help