Sum an array
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
배열 합계 계산
a이 가리키는 n 정수를 더하십시오. const int *a와 같은 포인터는 배열과 같게 작동하며, a[i]은 i번째 요소입니다.
난이도 3/5 · 200코인 + 오늘 첫 완료 시 작은 보너스 추가
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.
출력을 보려면 '실행'을 클릭하세요.