Advertisement
kalin729

yovkata 7

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