Temperature conversion: Difference between revisions
Content added Content deleted
Basicgames (talk | contribs) |
|||
Line 4,186: | Line 4,186: | ||
f = r - 459.67 |
f = r - 459.67 |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|RPL}}== |
|||
RPL has a built-in conversion feature with a convenient catalog of units. |
|||
≪ { "°C" "°F" "°R" } → tempk units |
|||
≪ 1 3 '''FOR''' j |
|||
tempk "°K" units j GET CONVERT |
|||
SWAP →STR SWAP + |
|||
'''NEXT''' |
|||
≫ ≫ 'K→CFR' STO |
|||
21 K→CFR |
|||
{{out}} |
|||
<pre> |
|||
3: "-252.15°C" |
|||
2: "-421.87°F" |
|||
1: "37.8°R" |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |