Home > Back-end >  Strives for the big help
Strives for the big help

Time:10-15

Was supposed to be nested loop to print out the pyramid type letters, why is this duck

CodePudding user response:

For the back of the semicolon

CodePudding user response:

Logically, to optimize the
Suppose your gold tower have n layer, you need to output n lines, each line, there are two things: 1. The space in front of,
2. The letterThe first line is in front of the (n - 1)/2 Spaces 1 letter
The second line is in front of the (n - 2)/2 Spaces 2 letter

So on
The front line of the output I (n - I)/Spaces letters I

Such two layers of cycle

CodePudding user response:

reference 1st floor lin5161678 response:
for the back of the semicolon to remove

I try not make

CodePudding user response:

reference 1st floor lin5161678 response:
for the back of the semicolon to remove

I solved the last night, the original space the inner loop of no effect
  • Related