Input:Two array data
Output:Merging first array data and second array data
Sample Input: First array:1,2,3,4,5
Second array 6,7,8,9,10
Sample Output:1,2,3,4,5,6,7,8,9,10
-------------------------------------------------------
-------------------------------------------------------
//Merging two data
#include <stdio.h>
int main()
{
int a[100],n,n1,i,j,k=0,b[100],c[100],n2;
printf("Enter the upper value of First array:\n");
scanf("%d",&n);
printf("----------The First array number-------------\n");
for(i=0;i<=n;i++)
{
scanf("%d",&a[i]);
c[k]=a[i];
k++;
}
printf("Enter the upper value of seirst array:\n");
scanf("%d",&n1);
printf("------------The Second array number------------\n");
for(j=0;j<=n1;j++)
{
scanf("%d",&b[j]);
c[k]=b[j];
k++;
}
for(i=0;i<=n+n1+1;i++)
{
printf(" The merging Array list:%d\n",c[i]);
}
}
(By:shahimtiyaj)
0 comments:
একটি মন্তব্য পোস্ট করুন