0

is there easy way to understand nested loop and not get confused?

22nd Jan 2025, 1:46 PM
eli
eli - avatar
3 Respostas
+ 3
Practise helps. I also put 2 print statements. One in each loop (although you could just use one). In your first loop, say you're using int i, Then print that, second loop, using int j, print that. You should have something like i = 0 j = 0 j = 1 j = 2 i = 1 j = 0 j = 1 j = 2 i = 2 j = 0 j = 1 j = 2 Does that help?
22nd Jan 2025, 3:58 PM
Ausgrindtube
Ausgrindtube - avatar
0
Ye aap kaisa hi bhi
22nd Jan 2025, 6:39 PM
SANOJ KUMAR
SANOJ KUMAR - avatar