I'm preparing an online tutorial page that does code evaluation using pre-fed tests. I'm trying to write a simple program in an online ide environment and readline(prompt="")
does not work.
Can anyone suggest what needs to be modified for online environment? link to online code: jdoodle.com/a/PzU
for reference: code is
x <- 10
y <- 25
z <- sum(x,y)
p <- readline(prompt="enter val:")
cat("x + y = ", z)
cat(p)
cat("\nterminate")
output is:
enter val:
x + y = 35
terminate
desired output:
enter val:
[reads input value: "3"]
x + y = 35
3
terminate