fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. double x;
  5. std::cin >> x;
  6. std::cout << (x <= 7 ? -3 * x + 9 : 1 / (x - 7)) << std::endl;
  7. return 0;
  8. }
Success #stdin #stdout 0s 3460KB
stdin
1
stdout
6