Advertisement
Josif_tepe

Untitled

Nov 12th, 2022
1,029
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main() {
  5.     int X;
  6.     scanf("%d", &X);
  7.    
  8.     int broj;
  9.     int deliteli = 0;
  10.     int brojac = 0;
  11.     while(scanf("%d", &broj)) {
  12.         brojac++;
  13.         if(X % broj == 0) {
  14.             deliteli++;
  15.         }
  16.         if(deliteli == 2) {
  17.             break;
  18.         }
  19.     }
  20.     printf("%d \n", brojac);
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement