fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x;
  6. cin >> x;
  7.  
  8.  
  9. cout << x - x % 2 << endl;
  10.  
  11.  
  12. cout << x + (x % 2) << endl;
  13.  
  14.  
  15. cout << x - 1 - (1 - x % 2) << endl;
  16.  
  17. cout << x + 1 + (x % 2 - 1) << endl;
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5256KB
stdin
79
stdout
78
80
78
80