0
Why do all my codes prompt me for user input before the question has been displayed?
Whenever I am in the code playground and I have a Console.WriteLine command, e.g. "what is your name?", followed by a Console.ReadLine command, e.g. reading in the name, I am expecting that when I run the code, the written line will first be displayed followed by a chance for user input. However, instead when I run the code, it just says my code is expecting some input. How is the user to know it is their name they are meant to enter? The code then finishes running and Then displays the "what is your name" line, i.e. after it has been entered. Is there a way around this? Is this just a quirk of the app? Many thanks in advance
3 ответов
+ 3
This code explains it:
https://code.sololearn.com/WhiNb9BkJUVC/?ref=app
+ 1
Thank you HonFu ! That explained what is happening, but the solution was just to avoid asking for user input.
So is there really no way around it? And does this apply outside the app also like in Visual Studio for example?
+ 1
No, this is specific Sololearn, because code is not executed live here.
You can take inputs, you just have to give them all *before* the code runs, separated by line, in that one pop up window.