Temperature conversion: Difference between revisions
Content added Content deleted
m (minor formatting edits) |
|||
Line 2,009: | Line 2,009: | ||
=={{header|MiniScript}}== |
=={{header|MiniScript}}== |
||
<lang MiniScript>fromKelvin = function(temp) |
<lang MiniScript>fromKelvin = function(temp) |
||
print temp + " degrees in Kelvin is |
print temp + " degrees in Kelvin is:" |
||
Celsius = temp - 273.15 |
Celsius = temp - 273.15 |
||
print Celsius + " degrees Celsius" |
print Celsius + " degrees Celsius" |
||
Line 2,018: | Line 2,018: | ||
end function |
end function |
||
temp = input(" |
temp = input("Enter a temperature in Kelvin: ") |
||
fromKelvin temp.val</lang> |
fromKelvin temp.val</lang> |
||
{{out}} |
{{out}} |
||
Line 2,028: | Line 2,028: | ||
491.67 degrees Rankine |
491.67 degrees Rankine |
||
Enter a temperature in Kelvin: 300 |
|||
300 degrees in Kelvin is |
300 degrees in Kelvin is: |
||
26.85 degrees Celsius |
26.85 degrees Celsius |
||
80.33 degrees Fahrenheit |
80.33 degrees Fahrenheit |