Advertisement
Malinovsky239

Untitled

Mar 21st, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <cstdio>
  2. #include <string>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. string IntToStr(int a) {
  8.     string res = "";
  9.     while (a) {
  10.         char sym = '0' + a % 10;
  11.         res = sym + res;
  12.         a /= 10;               
  13.     }
  14.     return res;
  15. }
  16.  
  17. int main() {
  18.     int a, b;
  19.     cin >> a >> b;
  20.     string res = IntToStr(a) + IntToStr(b);
  21.     cout << res << endl;   
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement