- 1
Why does second and every next input not work?
when I use code playground for C++, and I make a code that requires more than one input, it inputs there random numbers instead of the second and every next input. Why?
4 ответов
+ 11
Code Playground is an online IDE which sends input data to the server prior to code compilation. A live console is not provided.
Split multiple input into different lines, e.g. If you have three inputs:
12
3
4
+ 5
On code playground you're mandatory to provide all inputs required by your code at once, each one separated by new line, just before running it: this is a limitation because codes are executed on server side, so no real interactivity, as inputs are send at once to server, and output received once at end ^^
0
The Code playground isn't what happen when you compile your code with a real compiler.
So you need to enter all the inputs at the beginning, separated by a line :
int a, b, v;
cin>>a>>b>>v;
You'll need to enter :
1
3
4
0
thanks