Advertisement
Josif_tepe

Untitled

Mar 9th, 2023
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.     cin >> a;
  8.     int deliteli = 0;
  9.    
  10.     for(int i = 1; i <= a; i++) {
  11.         if(a % i == 0) {
  12.             deliteli++;
  13.         }
  14.     }
  15.    
  16.     switch(deliteli) {
  17.         case 2:
  18.             cout << "prost" << endl;
  19.             break;
  20.         default:
  21.             cout << "slozhen" << endl;
  22.             break;
  23.     }
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement