Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Loops-Nested/Wren/loops-nested.wren
Normal file
23
Task/Loops-Nested/Wren/loops-nested.wren
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import "random" for Random
|
||||
import "/fmt" for Fmt
|
||||
|
||||
var rand = Random.new()
|
||||
|
||||
var a = List.filled(20, null)
|
||||
for (i in 0..19) {
|
||||
a[i] = List.filled(20, 0)
|
||||
for (j in 0..19) a[i][j] = rand.int(1, 21)
|
||||
}
|
||||
|
||||
var found = false
|
||||
for (i in 0..19) {
|
||||
for (j in 0..19) {
|
||||
System.write(Fmt.d(4, a[i][j]))
|
||||
if (a[i][j] == 20) {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
System.print()
|
||||
if (found) break
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue