#include <iostream>
#include <vector>
int main() {
std::vector<int> array = {1, 2, 3, 4, 5};
int sum = 0;
for (int num : array) {
sum += num;
}
std::cout << "Сумма элементов массива: " << sum << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6OnZlY3RvcjxpbnQ+IGFycmF5ID0gezEsIDIsIDMsIDQsIDV9OwogICAgaW50IHN1bSA9IDA7CgogICAgZm9yIChpbnQgbnVtIDogYXJyYXkpIHsKICAgICAgICBzdW0gKz0gbnVtOwogICAgfQoKICAgIHN0ZDo6Y291dCA8PCAi0KHRg9C80LzQsCDRjdC70LXQvNC10L3RgtC+0LIg0LzQsNGB0YHQuNCy0LA6ICIgPDwgc3VtIDw8IHN0ZDo6ZW5kbDsKICAgIHJldHVybiAwOwp9Cg==