+ 1
Problem with readline method
when we write writeline method with a line asking for input before readline method we actually expect to be asked for input then inter input but actually what happens when executing code is we first enter input and then system print asking line for input at the end while we expect to see it just before inputing data to ask user for specific data. why i have this problem?
2 Antworten
+ 6
You have that problem because you're using the Code Playground, rather than a "real" compiler. SoloLearn is set up to ask for ALL inputs in the beginning, and then execute your code. Without going into details, it's a necessary security measure for them to regulate/limit their compiler since it's open for the public to post/share anything on it.
If you do the same thing in another compile (Visual Studio, for example), then it'll work as you expect it to.
Hope that helps!
0
That helped a lot thank you.