Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int a[10],i,j,b[10],a1[30],l1=1,u1,l2=1,u2,u;
- cin>>u1;
- for(i=l1;i<=u1;i++)
- {
- cin>>a[i];
- }
- cin>>u2;
- for(j=l2;j<=u2;j++)
- {
- cin>>b[j];
- }
- u=u1+u2-l1+1;
- for(i=l1;i<=u1;i++)
- {
- a1[i]=a[i];
- }
- for(i=u1+1,j=l2;i<=u;i++)
- {
- {
- a1[i]=b[j];
- j++;
- }
- }
- for(i=l1;i<=u;i++)
- {
- cout<<a1[i];
- }
- }
Add Comment
Please, Sign In to add comment