RosettaCodeData/Task/Temperature-conversion/00DESCRIPTION

34 lines
894 B
Text
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
{{omit from|Lilypond}}
2016-12-05 22:15:40 +01:00
There are quite a number of temperature scales. For this task we will concentrate on four of the perhaps best-known ones:
[[wp:Kelvin|Kelvin]], [[wp:Degree Celsius|Celsius]], [[wp:Fahrenheit|Fahrenheit]], and [[wp:Degree Rankine|Rankine]].
2013-04-11 01:07:29 -07:00
2013-10-27 22:24:23 +00:00
The Celsius and Kelvin scales have the same magnitude, but different null points.
2013-04-11 01:07:29 -07:00
2016-12-05 22:15:40 +01:00
: 0 degrees Celsius corresponds to 273.15 kelvin.
: 0 kelvin is absolute zero.
2013-04-11 01:07:29 -07:00
2016-12-05 22:15:40 +01:00
The Fahrenheit and Rankine scales also have the same magnitude, but different null points.
2013-04-11 01:07:29 -07:00
2016-12-05 22:15:40 +01:00
: 0 degrees Fahrenheit corresponds to 459.67 degrees Rankine.
: 0 degrees Rankine is absolute zero.
2013-04-11 01:07:29 -07:00
2016-12-05 22:15:40 +01:00
The Celsius/Kelvin and Fahrenheit/Rankine scales have a ratio of 5 : 9.
2013-04-11 01:07:29 -07:00
2015-02-20 00:35:01 -05:00
2016-12-05 22:15:40 +01:00
;Task
Write code that accepts a value of kelvin, converts it to values of the three other scales, and prints the result.
;Example:
2013-04-11 01:07:29 -07:00
<pre>
K 21.00
C -252.15
F -421.87
R 37.80
</pre>
2016-12-05 22:15:40 +01:00
<br><br>