Advertisement
Josif_tepe

Untitled

Feb 26th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n; // brojot na dijamanti
  9.     int deliteli = 0;
  10.     for(int i = 1; i <= n; i += 1) {
  11.         if(n % i == 0) { // i e delitel na n
  12.             deliteli += 1;
  13.         }
  14.     }
  15.     if(deliteli == 2) {
  16.         cout << "PROST" << endl;
  17.     }
  18.     else if(deliteli > 2) {
  19.         cout << "SLOZEN" << endl;
  20.     }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement