fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double A,B;
  7. cin >> A >> B ;
  8.  
  9. cout << "floor "<< A << " / "<< B <<" = "<< floor(A/B)<< "\n";
  10. cout << "ceil "<< A << " / "<< B <<" = "<< ceil(A/B)<< "\n";
  11. cout << "round "<< A << " / "<< B <<" = "<< round(A/B)<< "\n";
  12.  
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
floor 4.65783e-310 / 6.95272e-310 = 0
ceil 4.65783e-310 /  6.95272e-310 = 1
round 4.65783e-310 / 6.95272e-310 = 1