fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout << (int) 1.25 << endl;
  6. cout << ((int)(1.25 * 0x1000000) >> 24) << endl;
  7. cout << (int) -1.25 << endl;
  8. cout << ((int)(-1.25 * 0x1000000) >> 24) << endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
1
1
-1
-2