+ 1
Array Calculations
can someone explain why the number output is as big as it is. THANKS AS ALWAYS! 🙄 https://code.sololearn.com/cwWMoSlV09Bi/?ref=app
7 ответов
+ 9
https://code.sololearn.com/c12ja7amjqiE/?ref=app
Here it is^
Initialize sum=0;
+ 8
You can fix it by putting the cout <<sum outside the loop as I have done the code edit
+ 7
You happen to be my 100th post btw 😃
+ 2
yea i figured it out before hand im dumb. thanks tho pixie 🙄
+ 1
and awesome 😂 glad i could be youre 100th post bro/guh, gratz 🙄
0
ahhh so the last number output is all of the elememts in the array added, the ones output before the last is adding number by number till it reaches the main sum?
0
ohhhhhhhh awesome thank you for the explanation pixie 😁