Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
finding volume of pyramids (for me, but feel free to use)
local r = 5 local b = 11*12 local h = 6 local enable_pi = true -- set true if you want to multiply by pi, set false to use set pi value local pi_value = 3.14 -- set to 0 if you dont want a set value local function cone() if enable_pi or pi_value == 0 then return (1/3)*r^2*math.pi*h else if pi_value == 0 then return (1/3)*r^2*h .."*pi" else return (1/3)*r^2*pi_value*h end end end local function square() return (1/3)*b*b*h end local function triagnle() return 1/3*((1/2)*b)*h end print(cone(), square(), triagnle())
run
|
edit
|
history
|
help
0
Error PCALL
Lua properties
lua5.3: ...Desktop/rextester_linux_2.0/usercode/68368288/source.lua:166: unexpected symbol near '}'
Non-Lua core for new scripting languages (Beta)
Random number generation with ranges (Lua)
Random numbers in Lua. Range: 1-49. Sets of numbers without duplicates
PAID HACK PuBG
10 Line challenge
zzz
Replace all substring in string