+ 3

How do calculate the sum of numbers in an array using c language

Array and c programming language

6th Mar 2018, 7:01 AM
Mark Kendrick
Mark Kendrick - avatar
2 Réponses
+ 4
Let me give you a pseudocode and then you try it yourself: anArray[size] sum = 0 index = 0 while index < size sum = sum + anArray[index] index = index + 1 It brings the idea that iterate through each elements in the array and sum them up one by one to the variable sum.
6th Mar 2018, 7:13 AM
Andy Tan
Andy Tan - avatar
6th Mar 2018, 7:06 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar