+ 1

for() loop not running.

I am trying to build a small encryption code, but one of my for() loops just won't run! It doesn't work - see it for yourself: https://code.sololearn.com/cSNGZMHGxirx/#java

16th Nov 2021, 5:06 PM
OverdrivedProgrammer
1 ответ
+ 3
Your for conditions are initially false so any loops won't get starts.. When initially I=0 and then I==10 is false then loop terminated before starting.. You may trying looping from I=0 to 10 then you need conditions like for (int I=0; I<10;I++) { .. } //Revise the topic of for loop... Hope it helps... edit: OverdrivedProgrammer your array length is 9 only so use i<9 condition instead of I<10
16th Nov 2021, 5:23 PM
Jayakrishna 🇮🇳