+ 1

How to print the value of string in this program?

https://code.sololearn.com/cOAy4p7JQeD1/?ref=app

30th Jan 2021, 3:49 PM
Sarvesh Chaudhary
Sarvesh Chaudhary - avatar
2 Answers
+ 2
Read a line before reading value for <str>. Something is left behind in the input stream after reading a char for <ch>, which prevents a correct read operation. in.readLine(); // add this str = in.readLine();
30th Jan 2021, 3:58 PM
Ipang
+ 1
Thankq Ipang â˜șâ˜ș
2nd Feb 2021, 4:37 AM
Sarvesh Chaudhary
Sarvesh Chaudhary - avatar