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. · 출력을 보려면 '실행'을 클릭하세요.