fork(4) download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4. using namespace std;
  5. int main()
  6. {
  7. int a,b,res; float c;
  8. cin>>a;
  9. cin>>b;
  10. cin>>c;
  11. res=(a-b)/c;
  12. cout<<res << endl;
  13. cout << std::setprecision(16) << (float)(a-b)/c << endl;
  14. }
Success #stdin #stdout 0s 3464KB
stdin
2
1
0.2
stdout
4
4.999999925494195