How did you enter that input without a return (enter) ?
If you run this interactively and actually typing in all the input I think you'll understand the reason for the output.
You will have to:
a b c- nothing will output yet as the third
Scandoes not know if
cis all you'll type
return (enter)- only at this point you'll see the
- Do the same for the other lines
Take a look at the doc for
Scan which explains this as well: