fork download
  1. #include <cstdio>
  2.  
  3. int f(int x) {
  4. #define return(t) return (printf("%d => %d", x, t), t)
  5.  
  6. if (x < 0)
  7. return (x * x);
  8.  
  9. if (x > 0)
  10. return (-x);
  11.  
  12. return (2*x + 4);
  13.  
  14. #undef return
  15. }
  16.  
  17. int main() {
  18. f(100);
  19. return 0;
  20. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
100 => -100