#include<stdio.h>
int main(){
    int n;
    scanf("%d",&n);
    int a[n];
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    int sum=0;
    for(int i=0;i<n;i++){
        sum=sum+a[i];
    }
    printf("%d",sum);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: