Josif_tepe

Untitled

Aug 27th, 2025
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5.  
  6. int main() {
  7.    
  8.     int n;
  9.     scanf("%d", &n);
  10.    
  11.     int niza[n];
  12.     for(int i = 0; i < n; i++) {
  13.         scanf("%d", &niza[i]);
  14.     }
  15.    
  16.     int zbir = 0;
  17.     for(int i = 0; i < n; i++) {
  18.         zbir += niza[i];
  19.     }
  20.    
  21.     printf("%d\n", zbir);
  22.    
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment