+ 1
How to print the value of string in this program?
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();
+ 1
Thankq Ipang âșâș