Advertisement
Josif_tepe

Untitled

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