+ 2

How to first print and then ask for a user‘s input?

https://code.sololearn.com/c1hBDZaCr2W4/?ref=app I just wanted to try how to get a user‘s input. It‘s working very well but my now my problem is: The user always has to make an input first and then sees the printed line which could for example be a question the program asks even if the line in the code to print it comes first. So, how can I write the code so that the user sees a printed line with e.g. a question first and then is able to respond with an input?

21st Apr 2019, 11:19 AM
Bittersweet
Bittersweet - avatar
4 Antworten
+ 7
You cant in sololearn with non-web codes the input window will always pop up first. if you learn some javascript you could do this in web 👍
21st Apr 2019, 11:35 AM
D_Stark
D_Stark - avatar
+ 2
Oh ok. Well, I‘m used to work with BlueJ and there it will first print and then ask for input, that‘s why I wondered. But in that case: Is there a way to put some text or a question in or on the in input box, as a title for example?
21st Apr 2019, 11:40 AM
Bittersweet
Bittersweet - avatar
+ 1
Oh ok. Well, it would be a great feature for the furure in my eyes. But thank you two for the clarification :)
21st Apr 2019, 11:50 AM
Bittersweet
Bittersweet - avatar