dim_multidimensional.lua 209 B

12345678910111213
  1. a={};for i=1,5 do;a[i]={};for j=1,5 do;a[i][j]=0;end;end
  2. for i=1,5 do
  3. for j=1,5 do
  4. a[i][j]=math.random(50)
  5. end;end
  6. for i=1,5 do
  7. for j=1,5 do
  8. print(a[i][j])
  9. end
  10. print()
  11. end