Ссылка
нажмите — покажем
нажмите — покажем
https://youtu.be/p0L_QXzshsA
https://youtu.be/p0L_QXzshsA
_Nested for loops_ are quite difficult to behold for most beginners
In Java and in most programming languages, a _for loop_ is just a decision structure or control statement. That's, it controls which statements get executed and for how many times.
A single _for loop_ is simple and clear but stuffing or nesting one _for loop_ in the other can be overwhelming and confusing to the untrained eye.
_Nested loops_ are pretty important to run several algorithms. One example is printing a Right-angled Triangle with asterisks.
The asterisks can be referenced horizontally or by _row_ and vertically or by _column_
It's also clear that the number of columns increase with an increase in the number of rows
This explains which rows, as outer loop, control the columns.
_In this video, *VillageCoder* explains how a Right-angled Triangle can be printed on the console using asterisks_
Time to rack your brain around algorithms.
Enjoy!!!
DON'T FORGET TO SUBSCRIBE and SHARE