Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
#include <iostream>
#include <vector>
#include <numeric>
int main() {
std::vector<int> v = {1, 2, 3, 4};
int sum = std::accumulate(v.begin(), v.end(), 0);
std::cout << sum;
return 0;
}Coding works best on desktop or with an external keyboard.