Double loop | Sololearn: Learn to code for FREE!

0

Double loop

Can we do double loop? like what i expected and tried earlier : for (int i = 0, j = k; i<k, j>0; i++, j--) { //statement } and it causes error 🤣 so, is there any way to do this Master? Thank you edit : it's not loop in loop for(){ for(){}}, so the code will do two loops in the same time

10/10/2020 4:25:25 AM

Wan

1 Answer

New Answer

+2

Here is correction int k=10; for (int i = 0, j = k; i<k&&j>0; i++, j--) { //statement }