Post History
C (gcc), 59 bytes i;f(m,n){while(i<m*n){putchar(i%n?32:13);putchar(48+i++);}} Attempt This Online! m is the number of rows. n is the number of columns.
Answer
#2: Post edited
# [C (GCC)](https://gcc.gnu.org), 57 bytes- ``` C
i;f(s,n){while(i<s){putchar(i%n?32:13);putchar(48+i++);}}- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=NYxNCoJAGEDXeYoPIpjxJ8lpYc1kRwkZneYD_YwcayGepI0bL9Btuk1Ctnrw4L3XpC9Xrcf3GklXXVGCal2BzdZmU-dMlH4OKA1rQ-L902JVMlQt72-d0za_M9zQWSTHneDyr_ZpgEHA5TAsA4XkoM6R2KPBgnu9tzIs8UUIcwVxDDWcIAmBZgiIogwMq32aBfeWxzj--AU)* `s` is the total number of elements, i.e. `m` times `n`.- * `n` is the number of columns.
- # [C (gcc)](https://gcc.gnu.org), 59 bytes
- ``` C
- i;f(m,n){while(i<m*n){putchar(i%n?32:13);putchar(48+i++);}}
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=m700OT49OXnBJuXMvOSc0pRUBZvikpTMfL0Mu6WlJWm6FjetM63TNHJ18jSryzMyc1I1Mm1ytYCcgtKS5IzEIo1M1Tx7YyMrQ2NNa5iQiYV2pra2pnVtLdQIi8y8EoXcxMw8jbL8zBRNrmouzjQNIx0FoB4FfX2FXAVbBSAvD0gZK-jq2imA7FPI0-SC6l-wAEIDAA)
- * `m` is the number of rows.
- * `n` is the number of columns.
#1: Initial revision
# [C (GCC)](https://gcc.gnu.org), 57 bytes ``` C i;f(s,n){while(i<s){putchar(i%n?32:13);putchar(48+i++);}} ``` [Attempt This Online!](https://ato.pxeger.com/run?1=NYxNCoJAGEDXeYoPIpjxJ8lpYc1kRwkZneYD_YwcayGepI0bL9Btuk1Ctnrw4L3XpC9Xrcf3GklXXVGCal2BzdZmU-dMlH4OKA1rQ-L902JVMlQt72-d0za_M9zQWSTHneDyr_ZpgEHA5TAsA4XkoM6R2KPBgnu9tzIs8UUIcwVxDDWcIAmBZgiIogwMq32aBfeWxzj--AU) * `s` is the total number of elements, i.e. `m` times `n`. * `n` is the number of columns.