RosettaCodeData/Task/Loops-Nested/LiveCode/loops-nested.livecode

22 lines
427 B
Plaintext

repeat with i = 1 to 10
repeat with j = 1 to 10
put random(20) into aNums[i,j]
end repeat
end repeat
repeat with i = 1 to 10
repeat with j = 1 to 10
if aNums[i,j] = 20 then
put true into exitLoop
exit repeat
end if
end repeat
if exitLoop then exit repeat
end repeat
if exitLoop then
put "20 found in" && i & comma & j
else
put "20 not found"
end if