#include <iostream> using namespace std; void sni(int a[],int b[],int c[]){ int an=4,bn=8,cn=12; int i=0,j=0,k=0; while(i<an&&j<bn){ if(a[i]>b[j]){ c[k]=b[j]; k++; b++; }else{ c[k]=a[i]; k++; i++; } } while(i<an){ c[k]=a[i]; i++; k++; } while(j<bn){ c[k]=b[j]; j++; k++; } } int main(){ int a[100]={1,4,5,7}; int b[100]={2,3,5,7,9,10,11,13}; int c[100]; sni(a,b,c); for(int i=0;i<12;i++){ cout<<c[i]<<" "; } return 0; }