Advertisement
Josif_tepe

Untitled

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