fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6.  
  7. auto foo = int{ 2.5 };
  8. auto bar = int(2.5);
  9.  
  10. std::cout << foo <<'\n' << bar << std::endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
2
2