fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4.  
  5. double X = 3.1234;
  6. double Y = 4.3455;
  7.  
  8. int myIntX = static_cast <int>(X);
  9. int myIntY = static_cast <int>(Y);
  10.  
  11. std::cout << myIntX << std::endl;
  12. std::cout << myIntY << std::endl;
  13. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
3
4