+ 1
What Iâm doing wrong here? Help with while loop.
Hello. Please, someone can help me? I donât know what Iâm doing wrong. Itâs continuous input exercise: fun main(args: Array<String>) { while(true) { var input = readLine()!!.toInt() if (input == 0){ break } println(input) } } https://sololearn.com/coach/1124/?ref=app Thanks!
6 RĂ©ponses
+ 4
I think there is a problem in Sololearn compiler.
I tried it and passed all test cases.
Maybe it will work later :)
https://ibb.co/M7YWJFF
+ 3
https://www.sololearn.com/Discuss/2719241/?ref=app
+ 1
Isabella Martins
It is a new SoloLearn bug. Don't know since when it is happening but I experienced it today. When I run codes, it shows "No output". But if I keep running the code over and over again, it finally shows the output.
The same is happening with the code coach. Try repeatedly running the code and eventually you will get output and the test cases will pass (passed for me after trying around 5-6 times)
(When solving a problem, SoloLearn detects changes in the code and only reruns when there is some change. So you will need to do changes to the code before re-running it. The simplest way is to keep adding a space at the end of the code)
0
Hey Simba, it didnât work for me :(
0
This code? Right?
Here we go!
https://code.sololearn.com/cVb3jtC4j0hB/?ref=app
Not worked here
0
Hi