Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
334 B
1
Indexable
Never
#include <stdio.h>
#include<stdlib.h>
int main()
{
    long long int n,sum=0;
    scanf("%lld",&n);
    long long int a[n];
    for (int i = 0; i < n; i++)
    {
        scanf("%lld",&a[i]);
    }
    for (int i = 0; i < n; i++)
    {
        sum=sum+a[i];
    }
    printf("%lld\n",abs(sum));
    
    return 0;
}