Post History
Lua 5.4, 76 bytes function(m,n)for i=0,m*n-1 do _=(i%n==0)and print()or io.write(i,' ')end end Try it online!
Answer
#3: Post edited
# [Lua 5.4](https://lua.org/versions.html#5.4), 59 bytes- ``` lua
for i=0,m*n-1 do _=(i%n==0)and print()or io.write(i,' ')end- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwfq00rzkksz8PIU0jVydPM2lpSVpuhY3rdPyixQybQ10crXydA0VUvIV4m01MlXzbG0NNBPzUhQKijLzSjQ0QYry9cqLMktSNTJ11BXUNVPzUiBGrAGyuLjSNIx0FIyhpi5YAKEB)
- # [Lua 5.4](https://lua.org/versions.html#5.4), 76 bytes
- ``` lua
- function(m,n)for i=0,m*n-1 do _=(i%n==0)and print()or io.write(i,' ')end end
- ```
- [Try it online!](https://tio.run/##FcpBCoAgEEDRq8wmnAkLq/WcJaQSBnIMUTq@2eKv3r@rb4FbqHoUSYrRKoWUQdjZOOq0wJlgZ5RBmR15PeHJogXpn9L8ZikXijVg6OrYawFXCxu1Dw)
#2: Post edited
# [Lua 5.4](https://lua.org/versions.html#5.4), 63 bytes- ``` lua
for i=0,m-1 do for j=0,n-1 do io.write(n*i+j,' ')end print()end- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwfq00rzkksz8PIU0jVydPM2lpSVpuhY37dPyixQybQ10cnUNFVLyFUDcLCA3D8LNzNcrL8osSdXI08rUztJRV1DXTM1LUSgoyswr0QAxIcasAbK4uNI0jHQUjKEmL1gAoQE)
- # [Lua 5.4](https://lua.org/versions.html#5.4), 59 bytes
- ``` lua
- for i=0,m*n-1 do _=(i%n==0)and print()or io.write(i,' ')end
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwfq00rzkksz8PIU0jVydPM2lpSVpuhY3rdPyixQybQ10crXydA0VUvIV4m01MlXzbG0NNBPzUhQKijLzSjQ0QYry9cqLMktSNTJ11BXUNVPzUiBGrAGyuLjSNIx0FIyhpi5YAKEB)
#1: Initial revision
# [Lua 5.4](https://lua.org/versions.html#5.4), 63 bytes ``` lua for i=0,m-1 do for j=0,n-1 do io.write(n*i+j,' ')end print()end ``` [Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwfq00rzkksz8PIU0jVydPM2lpSVpuhY37dPyixQybQ10cnUNFVLyFUDcLCA3D8LNzNcrL8osSdXI08rUztJRV1DXTM1LUSgoyswr0QAxIcasAbK4uNI0jHQUjKEmL1gAoQE)