Double loop | Sololearn: Learn to code for FREE!


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


1 Answer

New Answer


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