void printer(char x)
{
int d, b, z;
for(z=x; z>=1; z--) {
for(b=z; b<=x-1; b++)
printf(" ");
for(d=z; d>=1; d--)
printf("%d ", d);
printf("\n");
}
}
that's my code which is supposed to print
4 3 2 1
4 3 2
4 3
4
when input is 4. however, it prints as
4 3 2 1
3 2 1
2 1
1