Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
13
Task/Temperature-conversion/Lua/temperature-conversion.lua
Normal file
13
Task/Temperature-conversion/Lua/temperature-conversion.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function convert_temp(k)
|
||||
local c = k - 273.15
|
||||
local r = k * 1.8
|
||||
local f = r - 459.67
|
||||
return k, c, r, f
|
||||
end
|
||||
|
||||
print(string.format([[
|
||||
Kelvin: %.2f K
|
||||
Celcius: %.2f °C
|
||||
Rankine: %.2f °R
|
||||
Fahrenheit: %.2f °F
|
||||
]],convert_temp(21.0)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue