3 ms·
And in C++ you would write this as follows (with a range library it would be a one-liner): const auto & xs = {1, 2, 3}; cout << accumulate(begin(xs), end(x
by wuch 10y ago
And in C++ you would write this as follows (with a range library it would be a one-liner):
const auto & xs = {1, 2, 3};
cout << accumulate(begin(xs), end(xs), 0);