Josif_tepe

Untitled

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