Computer Science, asked by YoungNino01, 9 months ago

C Language find the sum of the positions of the elements in the array that contain positive even values.

Answers

Answered by bhavishyanehra99
1

Answer:To find sum of all elements, iterate through each element and add the current element to the sum. Which is run a loop from 0 to n. The loop structure should look like for(i=0; i<n; i++). Inside the loop add the current array element to sum i.e. sum = sum + arr[i] or even you can do sum += arr[i].

Similar questions