It's impossible to enter in loop a multiple input. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

It's impossible to enter in loop a multiple input.

2nd Nov 2016, 5:05 PM
Emanuel Lozitsky
Emanuel Lozitsky - avatar
3 Answers
0
I'm not sure this is what you're looking for but here is code to get input using an array and loop. #include <iostream> int main() { int length = 5; int arr[length]; for (int i=0; i<length; i++) std::cin >> arr[i]; }
3rd Nov 2016, 2:16 PM
Geoffrey Casper
Geoffrey Casper - avatar
0
In my code it doesn't work. Once I input a data it runs endless, but if I input the data to end the loop it does work and finish the program successfully.
5th Nov 2016, 6:43 PM
Emanuel Lozitsky
Emanuel Lozitsky - avatar
0
Can you share your code?
5th Nov 2016, 6:52 PM
Geoffrey Casper
Geoffrey Casper - avatar