C, 135(削除) 135 (削除ここまで) 128 characters
-7 characters thanks to kevin cruijssen
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;;++i<22;i<10?h--:h++,p("\n"){)for(j=0;++j<11;){for(p(j==10?"0":"%d",j);for(,k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C, 135 characters
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C, (削除) 135 (削除ここまで) 128 characters
-7 characters thanks to kevin cruijssen
#define p printf
i=1,j,h=9,k;main(){for(;++i<22;i<10?h--:h++,p("\n"))for(j=0;++j<11;)for(p(j==10?"0":"%d",j),k=1;k++<h;)p(" ");}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C -, 135 characters
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C - 135 characters
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C, 135 characters
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace
C - 135 characters
#define p printf
i=1,j,h=9,k;main(){for(i;++i<22;){for(j=0;++j<11;){p(j==10?"0":"%d",j);for(k=1;k++<h;){p(" ");}}i<10?h--:h++;p("\n");}}
Fun bonus:
On my first compile I got the logic backwards and ended up with the output in reverse
i=1,j,k,h=9;main(){for(;i++<20;){for(j=0;j++<10;){printf(j==10?"0":"%d",j);for(k=1;k++<10-h;){printf(" ");}}i<11?h--:h++;printf("\n");}}
Edit: removed missed whitespace