Advertisement
Spocoman

08. Secret Door's Lock

Sep 12th, 2023
888
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.    
  7.     int a, b, c;
  8.     cin >> a >> b >> c;
  9.  
  10.     for (int i = 2; i <= a; i++) {
  11.         for (int j = 2; j <= b; j++) {
  12.             for (int x = 2; x <= c; x++) {
  13.                 if (i % 2 == 0 && x % 2 == 0 && (j == 2 || j == 3 || j == 5 || j == 7)) {
  14.                     cout << i << " " << j << " " << x << endl;
  15.                 }
  16.             }
  17.         }
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement