Sum an array
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · Эта страница требует современного браузера (с поддержкой SharedArrayBuffer). Пожалуйста, обновите Chrome, Edge, Firefox или Safari до последней версии.
English
Sum an array
Add the n integers that a points to. A pointer like const int *a works just like an array — a[i] is the i-th element.
Русский
Сумма массива
Сложите n целых чисел, на которые указывает a. Указатель вида const int *a работает так же, как массив — a[i] это i-й элемент.
Complete int sum_array(const int *a, int n) to return the sum of the n elements. Do not write main — the checker provides one.
Click Run to see the output here. · Нажмите Запустить, чтобы увидеть результат здесь.