0
i m not understanding for range under another for range...please let me know what is the logic behind it.
2 Answers
+ 6
The technique is called a nested loop. One loop is inside another loop. The outer loop, indexed by i, iterates down the rows of the pattern. The inner loop, indexed by j, iterates across the columns of each row and prints the asterisks '*'. The number of asterisks, as counted by j, depends on the row number in i.
+ 2
i - is houses along the street
j - is the rooms of each " i " house!