5 Answers
New Answer5 Answers
New AnswerIt'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.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message