Hi,
when I execute the code below, the input does not end up in the correct variables.
It needs more returns than expected to finish, everthing appears shifted by one or more returns.
(HackerRank challenges depend on console input)
println("enter integer i <CR> decimal d <CR> string s <CR>")
i = readline();
d = readline();
s = readline();
println("done")
I put this code in a file a.jl, then in Julia I run include("a.jl"). This is what I get in the REPL:
julia> include("a.jl")
enter integer i <CR> decimal d <CR> string s <CR>
1 # I wrote this and pressed Enter
2.3 # I wrote this and pressed Enter
hello # I wrote this and pressed Enter
done
Then I have the string "1" in the variable i, etc. Is this not what you expect?