fork(1) download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double y = .59;
  8. int x = (int)(y * 100.0);
  9. cout << setprecision(50);
  10. cout << y << endl;
  11. cout << y * 100.0 << endl;
  12. cout << x << endl;
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
0.58999999999999996891375531049561686813831329345703
59
59