fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float bigOne = 100000000000000;
  6. float smallerOne = 99990000000000;
  7. float expectedSubstraction = 10000000000;
  8. float divisionFactor = 1000000;
  9. cout << (bigOne-smallerOne)/divisionFactor << endl;
  10. cout<< "expected : " << expectedSubstraction/divisionFactor << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
9999.22
expected : 10000