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??

13th Nov 2016, 9:42 PM
Arnie
Arnie - avatar
2 Answers
+ 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.
13th Nov 2016, 10:35 PM
Tamra
Tamra - avatar
+ 1
no. let's report it to them
13th Nov 2016, 10:04 PM
damilare lamidi
damilare lamidi - avatar