Josif_tepe

Untitled

Aug 27th, 2025
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. #include <math.h>
  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 strogo_rastecka = 1;
  17.    
  18.     for(int i = 1; i < n; i++) {
  19.         if(niza[i] <= niza[i - 1]) {
  20.             strogo_rastecka = 0;
  21.         }
  22.     }
  23.    
  24.     if(strogo_rastecka == 1) {
  25.         printf("DA\n");
  26.     }
  27.     else {
  28.         printf("NE\n");
  29.     }
  30.    
  31.    
  32.     return 0;
  33. }
  34.  
  35. /*
  36.  8
  37.  1.3 0.7  7.0   2.5  3.3  14.9  5.1  2.24
  38.  **/
  39.  
Advertisement
Add Comment
Please, Sign In to add comment