3/28/2021 5:47:21 AM
It's because you increment i on line 18, which you don't need to do as i as incremented automatically as set by the for loop (line 8). This means that you're incremented i twice for each loop, so you get fewer lines than you are expecting.
The amount of rows depends on the input. So I need to know what did you input to get the 5 rows.
M. Jawahirullah are you trying to make a Floyd triangle?
Thank u Russ
No problem! Happy coding!
Send us a message