fork download
  1. #include <iostream>
  2. #include <sstream>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. int num1, num2, num3;
  8. stringstream ss;
  9.  
  10. num1 = 505;
  11. num2 = 560;
  12.  
  13. ss << num1 << num2;
  14. ss >> num3;
  15.  
  16. cout << num3 << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
505560