fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. double a = 0.49999999999999;
  7. float b = 0.49999999999999;
  8. cout << a << " " << b << "\n";
  9. cout << round(a) << " " << round(b);
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5524KB
stdin
Standard input is empty
stdout
0.5 0.5
0 1