0
Messages before input when running codes on sololearn.
The sololearn compiler ask for input before displaying any message. For example, the code " int a; cout >> "Enter a number: "; cin << a; " run the "cin" before the "cout", but it should be the other way. Is it possible to fix this thing??
2 ответов
+ 7
It's because of how the compiler works. Your device sends your code + inputs to a server, which compiles and runs it.
When the program asks for an input, it uses the ones you sent it, as soon as the program gets to an input. It simulates if it were typed in by a user.
It's kind of confusing that you can't send the inputs as it runs...it'd make more sense that way, but it's probably harder/more expensive to implement.
+ 1
no. let's report it to them