C++ stl how to find the sum of all elements in array
Answers
Answered by
0
Answer:
Explanation:
The program output is shown below.
#include<iostream>
int arr[10], n, i, sum = 0, pro = 1;
cout << "Enter the size of the array : ";
cin >> n;
cout << "\nEnter the elements of the array : ";
for (i = 0; i < n; i++)
cin >> arr[i];
for (i = 0; i < n; i++)
Answered by
0
Answer:
For calculating the largest of all the elements in a given list, we have std::max, but what if we want to find the largest element ...
Similar questions