+ 1
Kotlin readline() doesn't work?
Hi i was just writing a small program in kotlin which takes input from user and convert it into string. But i observed it threw an error when i used readline() to take input....any guesses it doesn't work on solo learn?
8 Réponses
+ 3
Errors without line numbers happen with server miscommunication. Always try multiple times when you get those errors before you assume that it is actual.
+ 4
What's the code that you're having troubles with?
+ 4
It does work fine. However, SoloLearn input works differently than elsewhere. The input prompt must receive all of the inputs your program requires. Once done, the inputs & code get loaded on a server and run. After it completes, the outputs are transfer back to display on your device.
+ 3
readLine is the correct spelling. You are missing an else after line 8 with a no.
+ 2
Line 6 should be || not &&. You want years not divisible by 100 or divisible by 400.
+ 1
Sure, thank you
0
https://code.sololearn.com/c1ndSdbUGgXP/?ref=app
Please check the code
0
I have capitalized the L in readLine now it is demanding an input but after giving let say "2012" as an input it shows on screen the first print statement which is "enter the year......" and once it also gave me "memory limit exceeds" on entering 2222