fork(1) download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. int main(int argc, char *argv[]) {
  5. double x = 1e24;
  6. double y = 1.;
  7. double z = -1e12;
  8. double min = std::min({x, y, z});
  9. double max = std::max({x, y, z});
  10.  
  11. double median = x + y + z - min - max;
  12.  
  13. std::cout << median << std::endl;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
-5.62954e+07