fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout << 1 / 2 << endl;
  6. cout << 1.0 / 2.0 << endl;
  7. cout << 3 / 2 << endl;
  8. return 0;
  9. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
0
0.5
1