When a loop resides inside of other loop .Nested loops are useful while if there is a need of looping for each count of other turn of a loop.
When we learn C language then we print many types of pattern using nested loop. as follows
- Handling Matrix/2-D Array input/output
- Processing Range of similar Data like array
- Printing Series
- Structure operation
Now I am going to print following pattern using all three types of loop.
While loop example
For loop example