RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/Arturo/create-a-two-dimensional-array-at-runtime.arturo

12 lines
257 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
width: to :integer input "give me the array's width: "
height: to :integer input "give me the array's height: "
arr: array.of: @[width height] 0
x: random 0 dec width
y: random 0 dec height
arr\[x]\[y]: 123
print ["item at [" x "," y "] =" arr\[x]\[y]]