Advertisement
Josif_tepe

Untitled

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