Advertisement
Josif_tepe

Untitled

Aug 20th, 2023
935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main(int argc, const char * argv[]) {
  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.         }
  13.     }
  14.     if(broj_na_deliteli == 2) {
  15.         printf("PROST");
  16.     }
  17.     else {
  18.         printf("SLOZEN");
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement