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を最新バージョンに更新してください。
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.
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. · int sum_array(const int *a, int n) を完成させて n 要素の和を返します。main を書かないでください — チェッカーが提供しています。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。