0
How to take input from user on c++ more then 1 time.Is it possible
Pls help me
4 Réponses
+ 2
Use a loop
for(int i = 0;i<5;i++){
int x;
cin >> x;
}
+ 1
multiple input are possible on c++, but sololearn playground requires that user give them all at once before sending script to server to be compiled/executed with the provided user inputs ^^
it means that it doesn't allow real interactivity: if you're expecting so, you must compile and execute on your side ;P
0
you can even use a recursion if you functions.
eg-:
void recursion(){
int input;
cout << "Enter a value: ";
cin >> input;
recursion();
}