You are viewing a single comment's thread. Return to all comments →
int main() { int n,sum=0; int i; scanf("%d",&n); int a[n];
for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++) sum=sum+a[i];
{ printf("%d",sum); }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Array Sum
You are viewing a single comment's thread. Return to all comments →
include
int main() { int n,sum=0; int i; scanf("%d",&n); int a[n];
{ printf("%d",sum); }
}