RosettaCodeData/Task/Loops-Nested/Lua/loops-nested.lua
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

15 lines
243 B
Lua

t = {}
for i = 1, 20 do
t[i] = {}
for j = 1, 20 do t[i][j] = math.random(20) end
end
function exitable()
for i = 1, 20 do
for j = 1, 20 do
if t[i][j] == 20 then
return i, j
end
end
end
end
print(exitable())