Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Temperature-conversion/LIL/temperature-conversion.lil
Normal file
12
Task/Temperature-conversion/LIL/temperature-conversion.lil
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Temperature conversion, in LIL
|
||||
func kToc k {expr $k - 273.15}
|
||||
func kTor k {expr $k / 5.0 * 9.0}
|
||||
func kTof k {expr [kTor $k] - 469.67}
|
||||
|
||||
write "Enter kelvin temperatures or just enter to quit: "
|
||||
for {set k [readline]} {![streq $k {}]} {set k [readline]} {
|
||||
print "Kelvin: $k"
|
||||
print "Celsius: [kToc $k]"
|
||||
print "Fahrenheit: [kTof $k]"
|
||||
print "Rankine: [kTor $k]"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue