0
Почему цикл бесконечный, если не "depth-=5"?
function main() { var depth = parseInt(readLine(), 10); //ваш код var day=0; while(depth>2){ day++; depth-5; } console.log(day); }
1 Antwort
+ 1
Leo , because you didn't assign the value of depth anywhere. In the loop it should be => depth = depth - 5 or depth -= 5.