Taking input by a object of the Scanner class is very problematic. Please visit my code. My questions are in comments. https://code.sololearn.com/c6Xunlk0IlS9/?ref=app
8/15/2018 5:45:36 AM
Sayan Kundu4 Answers
New AnswerString s; scan.nextLine(); // Clear "\n" leftover by previous input. s = scan.nextLine(); Hth, cmiiw
KrOW you right but it depends on the no. of inputs ...if it's input is more than once then during running time process the first input is taken ..second input requires enter to be pressed
Because SL system, you have to put all your program input, all in once time (differently on local environment like your PC)
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message