Advertisement
Josif_tepe

Untitled

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