Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
32
Task/Temperature-conversion/8th/temperature-conversion.8th
Normal file
32
Task/Temperature-conversion/8th/temperature-conversion.8th
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
: KtoC \ n -- n
|
||||
273.15 n:-
|
||||
;
|
||||
|
||||
: KtoF \ n -- n
|
||||
1.8 n:* 459.67 n:-
|
||||
;
|
||||
|
||||
: KtoR \ n -- n
|
||||
1.8 n:*
|
||||
;
|
||||
|
||||
: KtoCFR \ n --
|
||||
dup dup dup
|
||||
. " degrees Kelvin" . cr
|
||||
KtoC
|
||||
. " degrees Celcius" . cr
|
||||
KtoF
|
||||
. " degrees Fahrenheit" . cr
|
||||
KtoR
|
||||
. " degrees Rankine" . cr
|
||||
;
|
||||
|
||||
: app:main \
|
||||
argc 0 n:=
|
||||
if
|
||||
"Syntax" . cr " temp.8th number" . cr
|
||||
else
|
||||
0 args >n KtoCFR
|
||||
then
|
||||
bye
|
||||
;
|
||||
Loading…
Add table
Add a link
Reference in a new issue