0
How did this work?
I just started learning java for about a week and I was baffled by this one, can anybody explain to me how the output of solo learn's example is a triangle? Thanks in advance. https://code.sololearn.com/c3I8ORHVAVHQ/?ref=app
2 ответов
+ 2
This results from the nested loop. A nested loop is a loop inside a loop. The inner loop draws the stars per line. The outer loop increases the number of stars per line and prints a linefeed after each line.
0
Thanks