Josif_tepe

Untitled

Aug 13th, 2025
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.     int broj;
  5.    
  6.     int prethoden_broj;
  7.     int dali_sme_na_prviot_broj = 1;
  8.     int kolku_broevi = 0;
  9.    
  10.     while(scanf("%d", &broj)) {
  11.         if(dali_sme_na_prviot_broj == 1) {
  12.             prethoden_broj = broj;
  13.             dali_sme_na_prviot_broj = 0;
  14.         }
  15.         else {
  16.             if(prethoden_broj >= broj) {
  17.                 break;
  18.             }
  19.             prethoden_broj = broj;
  20.         }
  21.         kolku_broevi++;
  22.     }
  23.    
  24.     printf("%d\n", kolku_broevi);
  25.    
  26.     return 0;
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment