fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x, y;
  7. cin >> x >> y;
  8. cout << ( abs ( x ) - abs ( y ) ) / ( abs ( x ) + abs ( y ) ) << endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3416KB
stdin
1 1
stdout
0