#include <stdio.h>
int main() {
int array[] = {1, 2, 3, 4, 5};
int sum = 0;
int size = sizeof(array) / sizeof(array[0]);
for (int i = 0; i < size; i++) {
sum += array[i];
}
printf("Сумма элементов массива: %d\n", sum
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBhcnJheVtdID0gezEsIDIsIDMsIDQsIDV9OwogICAgaW50IHN1bSA9IDA7CiAgICBpbnQgc2l6ZSA9IHNpemVvZihhcnJheSkgLyBzaXplb2YoYXJyYXlbMF0pOwoKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgc2l6ZTsgaSsrKSB7CiAgICAgICAgc3VtICs9IGFycmF5W2ldOwogICAgfQoKICAgIHByaW50Zigi0KHRg9C80LzQsCDRjdC70LXQvNC10L3RgtC+0LIg0LzQsNGB0YHQuNCy0LA6ICVkXG4iLCBzdW0pOwogICAgcmV0dXJuIDA7Cn0K