require "io2" require "table2" print("Enter the dimensions of the array:") local x = io.readInt(" First dimension : ", 1) local y = io.readInt(" Second dimension : ", 1) local a = table.create(x) for i = 1, x do a[i] = table.rep(y, 0) end a[x][y] = 42 print($"\na[{x}][{y}] = {a[x][y]}") a = nil