Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int concat(int a ,int b)
- {
- int nr=0,i,bb;
- bb=b;
- while(bb)
- {
- bb/=10;
- nr++;
- }
- for(i=1;i<=nr;i++)
- a=a*10;
- a=a+b;
- return a;
- }
- int main()
- {int n,x;
- cin>>n>>x;
- cout<<concat(n,x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement