Advertisement
Josif_tepe

Untitled

Jun 14th, 2024
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int niza[5];
  7.  
  8.     niza[0] = 10;
  9.     niza[1] = 20;
  10.     niza[2] = 30;
  11.     niza[3] = 40;
  12.     niza[4] = 50;
  13.  
  14.     int zbir = 0;
  15.     for(int i = 0; i < 5; i++) {
  16.         zbir += niza[i];
  17.     }
  18.     cout << zbir << endl;
  19.    
  20.  
  21.  
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement