Temperature conversion: Difference between revisions
Content added Content deleted
(→Insitux: implementation) |
(Added Quite BASIC) |
||
Line 875: | Line 875: | ||
130 PRINT K*1.8-459.67;TAB(10);"Degrees Fahrenheit" |
130 PRINT K*1.8-459.67;TAB(10);"Degrees Fahrenheit" |
||
140 PRINT K*1.8;TAB(10);"Degrees Rankine"</syntaxhighlight> |
140 PRINT K*1.8;TAB(10);"Degrees Rankine"</syntaxhighlight> |
||
==={{header|Quite BASIC}}=== |
|||
<syntaxhighlight lang="qbasic">10 PRINT "Kelvin Degrees "; |
|||
20 INPUT ""; K |
|||
30 IF K <= 0 THEN END |
|||
40 LET C = K-273.15 |
|||
50 LET F = K*1.8-459.67 |
|||
60 LET R = K*1.8 |
|||
70 PRINT K;" Kelvin is equivalent to" |
|||
80 PRINT C;" Degrees Celsius" |
|||
90 PRINT F;" Degrees Fahrenheit" |
|||
100 PRINT R;" Degrees Rankine" |
|||
110 GOTO 10</syntaxhighlight> |
|||
==={{header|Sinclair ZX81 BASIC}}=== |
==={{header|Sinclair ZX81 BASIC}}=== |
||
Line 895: | Line 908: | ||
PRINT R," Rankine"</syntaxhighlight> |
PRINT R," Rankine"</syntaxhighlight> |
||
=={{header|Tiny Craft Basic}}== |
==={{header|Tiny Craft Basic}}=== |
||
<syntaxhighlight lang="basic">10 cls |
<syntaxhighlight lang="basic">10 cls |
||
20 input "Temperature in Kelvin: ", k |
20 input "Temperature in Kelvin: ", k |