Josif_tepe

Untitled

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