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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!