You are viewing a single comment's thread. Return to all comments →
#include <stdio.h> long a_very_big_sum(int count, long a[]); long fill_vector(long a[], int count); long a_very_big_sum(int count, long a[]) { long sum = 0; for (int i = 0; i < count; i++) { sum += a[i]; } return sum; } long fill_vector(long a[], int count) { for (int i = 0; i < count; i++) { scanf("%ld", &a[i]); } return a_very_big_sum(count, a); } int main() { int count = 0; scanf("%d", &count); long a[count]; long result = fill_vector(a,count); printf("%ld", result); return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
A Very Big Sum
You are viewing a single comment's thread. Return to all comments →