Home > Back-end >  Bosses to see,
Bosses to see,

Time:10-28


[face]Don't know if the language is not good, don't understand

CodePudding user response:

The first line output 1 part of data
The second line output 2 part of data
.
Line 9 output data of 9
The first ten lines of the output data of 0
In line 11 output 1 part of data
The 12th line output data of 2
And so on and so on, this is the meaning of I % 10
And then according to the pyramid upside down print

Int main () {
Int I, j, n.
The scanf (" % d ", & amp; n);
For (int I=n; I> 0; I -) {
for(j=0; jfor(j=0; j<2 * I - 1; J++) printf (" % d ", (n - I + 1) % 10);//print data
printf("\n");//line breaks
}
Return 0;
}