fork download
  1.  
  2. #include <iostream>
  3. #include <cmath>
  4. using namespace std;
  5. int main()
  6. {
  7. double x;
  8. double y;
  9. cin >> x >> y;
  10. cout << "floor " << x << " / " << y << " = " << floor(x / y) << endl;
  11. cout << "ceil " << x << " / " << y << " = " << ceil(x / y) << endl;
  12. cout << "round " << x << " / " << y << " = " << round(x / y) << endl;
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5464KB
stdin
Standard input is empty
stdout
floor 4.68149e-310 / 6.95278e-310 = 0
ceil 4.68149e-310 / 6.95278e-310 = 1
round 4.68149e-310 / 6.95278e-310 = 1