0

Assignment

What to do, If I want to ask the utilisator to give numbers that the program will assigne them to the array?

3rd May 2020, 12:51 AM
Maryam Ben
Maryam Ben - avatar
4 Réponses
+ 2
Use a loop. for(int i=0;i<arrLen;i=i+1) array[ i ] = getInput() That's pseudocode. Specify your programming language next time to get better feedback.
3rd May 2020, 1:18 AM
Kevin ★
+ 1
Thanks a lot.. I meant in C++
3rd May 2020, 1:28 AM
Maryam Ben
Maryam Ben - avatar
+ 1
It's not a real function. In c++ use cin.
3rd May 2020, 1:44 AM
Kevin ★
0
Sorry I am a beginner, I didnt understand the getInput, how you use it?
3rd May 2020, 1:29 AM
Maryam Ben
Maryam Ben - avatar