fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. double x = 0.1;
  7. double y = (5/6)*x;
  8. double z = (5.0/6.0)*x;
  9.  
  10. cout << x << endl;
  11. cout << y << endl;
  12. cout << z << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4444KB
stdin
Standard input is empty
stdout
0.1
0
0.0833333