Advertisement
Josif_tepe

Untitled

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