Nested Loop is located inside other loop block.
Let's have a program that prints each combination of 2 dice rolls.
Output:
Each iteration of the outer loop executes the inner loop. Basically the outer loop repeats 6 times and the inner loop 36 (6 x 6).
Via nested loops figures like pyramids, triangles and others patterns can be printed.
Let's have a program which prints a rectangle with specific width and height
Output:
Any type of loop (while, for) can be nested inside other loop.