Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main()
  4. {
  5. long long sum=0,m=0;
  6. int n,i;
  7. scanf("%d",&n);
  8.  
  9. for(i=1;i<=n;i++)
  10. {
  11. scanf("%lld",&m);
  12. sum+=m;
  13. }
  14.  
  15. printf("%lld\n",llabs(sum));
  16.  
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement