Advertisement
SergeyPGUTI

3.2.11

Sep 30th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n,a,Sum=0;
  9.     cin>>n;
  10.     for (int i=0;i<n;i++)
  11.     {
  12.         cin>>a;
  13.         Sum+=a;
  14.     }
  15.     cout<<Sum;
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement