Interclasarea sirurilor
#include<iostream>
using namespace std;
int main()
{int a[100],b[100],c[100],i,j,k,n,m;
cout<<"n=";cin>>n;
cout<<"m=";cin>>m;
for(i=0;i<n;i++)
{cout<<"a["<<i<<"]=";cin>>a[i];}
for(j=0;j<m;j++)
{cout<<"b["<<j<<"]=";cin>>b[j];}
i=0;j=0;k=0;
while(i<n && j<m)
if(a[i]<b[j])
{c[k]=a[i];k++;i++;}
else {c[k]=b[j];k++;j++;}
while(i<n){c[k]=a[i];k++;i++;}
while(j<m){c[k]=b[j];k++;j++;}
for(i=0;i<k;i++)cout<<c[i]<<endl;}