SOLVED: Why can’t I add arrays properly? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

SOLVED: Why can’t I add arrays properly?

Just started learning C++ and for some reason the output is always an extremely long complicated number when it shouldn’t be. https://code.sololearn.com/c6830k22h0C0/?ref=app

2nd Apr 2022, 2:15 PM
Dylan Hope
5 Answers
+ 1
You add a loop to traverse through the newly initialised array and then input numbers to it. https://code.sololearn.com/crj6RvzI2KC5/?ref=app
2nd Apr 2022, 2:24 PM
Infinity
Infinity - avatar
+ 2
Enter something like this in the prompt that appears when you run the code: 3 1 2 3
2nd Apr 2022, 2:30 PM
Infinity
Infinity - avatar
+ 1
Infinity that works- thanks!
2nd Apr 2022, 2:32 PM
Dylan Hope
+ 1
you're welcome
2nd Apr 2022, 2:33 PM
Infinity
Infinity - avatar
0
Hi Infinity - thanks for your response. For some reason, its still not working (for me) with your code either
2nd Apr 2022, 2:28 PM
Dylan Hope