Advertisement
Josif_tepe

Untitled

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