You are on page 1of 1

#include<iostream.

h>
int v[100][100],n,m,i,j,c,d[1000],k,q;
main()
{
cout<<"n=";
cin>>n;
cout<<"m=";
cin>>m;
cout<<"k=";
cin>>k;
cout<<"c=";
cin>>c;
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
{
cout<<"v["<<i<<"]["<<j<<"]=";
cin>>v[i][j];
}
}
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
cout<<v[i][j]<<" ";
cout<<endl;
}
cout<<endl;
for(j=1;j<=c;j++)
{
cout<<"d["<<j<<"]=";
cin>>d[j];
}
cout<<endl;
for(i=n+1;i>k;i--)
{
for(j=1;j<=m;j++)
{
v[i][j]=v[i-1][j];
}
}
for(j=1;j<=c;j++)
v[k][j]=d[j];
for(i=1;i<=n+1;i++)
{
for(j=1;j<=m;j++)
cout<<v[i][j]<<" ";
cout<<endl;
}
}

You might also like