+ 1

Can you help me to find the sum of numbers using array in C++?

https://code.sololearn.com/cfFhOWPus1IK/?ref=app

5th Jun 2018, 5:21 AM
Hedayatullah Munib
Hedayatullah Munib - avatar
3 Answers
+ 1
in for loop you should always initialize variable with 0; in your case int x = 0;
5th Jun 2018, 7:16 AM
Jakub Stasiak
Jakub Stasiak - avatar
0
Can you please rewrite the very code for me?
5th Jun 2018, 6:34 AM
Hedayatullah Munib
Hedayatullah Munib - avatar
- 1
You have to assign the input variables to the array myArr[0] = a; for example also there is a ; missing in the loop
5th Jun 2018, 6:25 AM
Matthias
Matthias - avatar