Question: Write a nested while loop which iterates a total of 3 times for inner loop and 3 times for the outer loops. Display the counter
Write a nested while loop which iterates a total of 3 times for inner loop and 3 times for the outer loops.
Display the counter inside each loop to visualize iterations.
For each iteration of the outer loop there should be 3 iterations of the inner loop.
Your output should look something like this:
Outer Loop: 1
---Inner Loop: 1
---Inner Loop: 2
---Inner Loop: 3
Outer Loop: 2
---Inner Loop: 1
---Inner Loop: 2
---Inner Loop: 3
Outer Loop: 3
---Inner Loop: 1
---Inner Loop: 2
---Inner Loop: 3
| |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
