Merging Of Two Arrays Into one array c++

#include <iostream.h>
#include<conio.h>
int main()
{
    int a[5],b[5],c,d[10],f,m=0;
    cout<<" Enter the 1st Array \n\n";
    for (c=0;c<5;c++)
    {
        cin>>a[c];
    }
    cout<<" Enter the 2nd Array \n\n";
    for (c=0;c<5;c++)
    {
        cin>>b[c];
    }
    cout<<"\n Merge Of Two Arrays is \n\n";
    for (c=0;c<5;c++)
    {
          d[c]=a[c];
    }
   
      for (c=0;c<5;c++)
    {
          d[c+5]=b[c];
    }
        for (c=0;c<10;c++)
    {
      
         cout<<d[c]<<endl;
     }
   
   
   
 getch();  
}
SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment