Josif_tepe

Untitled

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