Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Loops-Nested/NetRexx/loops-nested.netrexx
Normal file
28
Task/Loops-Nested/NetRexx/loops-nested.netrexx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref savelog symbols nobinary
|
||||
|
||||
say
|
||||
say 'Loops/Nested'
|
||||
|
||||
rnd = Random()
|
||||
dim2 = int[10, 10]
|
||||
|
||||
-- build sample data
|
||||
loop i1 = 0 for dim2.length
|
||||
loop i2 = 0 for dim2[i1].length
|
||||
dim2[i1, i2] = rnd.nextInt(20) + 1
|
||||
end i2
|
||||
end i1
|
||||
|
||||
-- run test
|
||||
loop x1 = 0 for dim2.length
|
||||
say Rexx(x1 + 1).right(4)': \-'
|
||||
loop x2 = 0 for dim2[x1].length
|
||||
say Rexx(dim2[x1, x2]).right(3) || '\-'
|
||||
if dim2[x1, x2] = 20 then leave x1
|
||||
finally
|
||||
say
|
||||
end x2
|
||||
finally
|
||||
say
|
||||
end x1
|
||||
Loading…
Add table
Add a link
Reference in a new issue