0

printing the questions..

i want to make a c++ program which is interactive. what i mean is that.. step1)ask a question step 2)take input step 3)ask another question. step 4) take input and so on.... however it is not working well(only taking input once..).. what to do?

21st Oct 2017, 11:03 AM
suhail pgm
suhail pgm - avatar
2 odpowiedzi
+ 7
Are you trying it using code playground? SoloLearn playground doesn't support taking multiple inputs on run time. You'll have to give all inputs at the beginning.
21st Oct 2017, 11:14 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 6
Well that's just the way it works if you're doing it in Code Playground, your code and all necessary input are "wrapped" and sent to SoloLearn's server to process/compile, that's why you're seeing the input dialog after you run it. The number of inputs passed to the code during compilation depends on the number of values you entered in the input dialog, you cannot do repetitive code like that in Code Playground, because once the input & code has been sent to server that's all there is to work with in the server's point of view. Hth, cmiiw
21st Oct 2017, 11:15 AM
Ipang