fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int d, y;
  6. cin >> d;
  7. if (d < -34) {
  8. y = 2 * d - 4;
  9. cout << y << endl;
  10. }
  11.  
  12. if (d >= -34) {
  13. y = 3 * d + 12;
  14. cout << y << endl;
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 4520KB
stdin
Standard input is empty
stdout
98310