Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
18
Task/Loops-Nested/Pluto/loops-nested.pluto
Normal file
18
Task/Loops-Nested/Pluto/loops-nested.pluto
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
local a = {}
|
||||
for i = 1, 20 do
|
||||
a[i] = {}
|
||||
for j = 1, 20 do
|
||||
a[i][j] = math.random(1, 20)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 20 do
|
||||
for j = 1, 20 do
|
||||
io.write(string.format("%2d ", a[i][j]))
|
||||
if a[i][j] == 20 then
|
||||
print()
|
||||
break 2 -- break from outer loop
|
||||
end
|
||||
if j % 10 == 0 then print() end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue