RosettaCodeData/Task/Temperature-conversion/FreeBASIC/temperature-conversion.basic

21 lines
437 B
Plaintext

' FB 1.05.0 Win64
Sub convKelvin(temp As Double)
Dim f As String = "####.##"
Print Using f; temp;
Print " degrees Kelvin"
Print Using f; temp - 273.15;
Print " degrees Celsius"
Print Using f; (temp - 273.15) * 1.8 + 32.0;
Print " degrees Fahreneit"
Print Using f; (temp - 273.15) * 1.8 + 32.0 + 459.67;
Print " degrees Rankine"
End Sub
convKelvin(0.0)
Print
convKelvin(21.0)
Print
Print "Press any key to quit"
Sleep