Is there a way to take new inputs at different times | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is there a way to take new inputs at different times

Can you have an input, run the program, then ask for more inputs after it's been run?

31st Mar 2017, 1:25 AM
Ethan
4 Answers
+ 17
Unfortunately, this is part of Code Playground's limitations. It has to take all user input prior to compiling the program. One way to do multiple input, is to split seperate input into different lines. That said, this limitation does not affect the functionalities of web codes.
31st Mar 2017, 1:41 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
You can take a one-line input, then seperate it into different inputs using arrays by splitting it using spaces.
31st Mar 2017, 2:03 AM
Wen Qin
Wen Qin - avatar
0
Okay, thanks!
31st Mar 2017, 3:42 AM
Ethan
0
I am facing the same problem. I need to have two inputs where the second input depends on the first. So I cannot enter them together. Help!
31st Mar 2017, 7:44 AM
CC Chen
CC Chen - avatar