fork(4) download
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6. double x = -1.4;
  7. std::cout << "(long long)x = " << ((long long)x) << "\n";
  8. std::cout << "(long long)floor(x) = " << ((long long)floor(x)) << "\n";
  9. return 0;
  10. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
(long long)x        = -1
(long long)floor(x) = -2