Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 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