Sunday, 1 November 2015

Write A Program To Merge Two Array In Third Array Unconditionally

#include <iostream>
#include<string.h>
#include<cstdlib>
using namespace std;
main ()
{
int s1,s2,a[100],b[100],i;
cout<<"Enter the size of Array 1\n\n";
cin>>s1;
cout<<"Enter the first Element of array\n\n";
for(i=0;i<s1;i++)
{
cin>>a[i];
}

cout<<"Enter the size of Array 2\n\n";
cin>>s2;
cout<<"Enter the Second Element of array\n\n";
for(i=s1;i<s2+s1;i++)
{
cin>>a[i];
}

cout<<"Merge array Are Given Below\n\n";
for(i=0;i<s1+s2;i++)
{
cout<<a[i]<<" ";
}

}

Output:-


Ghanendra Yadav
Ghanendra Yadav

I Am Ghanendra Yadav Owner Of This Website. I Love Programming, Web Developing, Logo Making, Banner And Website designing. Currently I Am Studying In NIT Warangal And Also Working With WSDC( As Web Application Developer ) In NIT Warangal For Any Query Mail Me I Will Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment