+ 2
Why i am getting error in this code and stopped running while loop ?
https://code.sololearn.com/cG9VDevgx25V/?ref=app Why while loop stopped working in sololearn code playground. Look at the code ?
1 ответ
0
while(number != -1){
...
}
You have to input a number until you input -1. Maybe in an IDE for PC it will work, because you can input the number when it's needed.
But in SL you have to input all numbers at the beginning.
Input 1 10 2 --> error
Input 1 10 2 -1 --> should work