fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. float f = 3.01;
  6. float mf = f * 100;
  7. double md = f * 100;
  8.  
  9. int if_ = mf;
  10. int id = md;
  11.  
  12. std::cout << f << ' ' << mf << ' ' << md << ' ' << ' ' << (mf - md) << ' ' << if_ << ' ' << id << '\n';
  13. }
  14.  
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
3.01 301 301  0 301 301