#include<iomanip>
#include <iostream>
using namespace std;
int main()
{
int wid,hei;
cout<<"Input wid"<<endl;
cin>>wid;
cout<<"Input hei"<<endl;
cin>>hei;
/***声明***/
int **arra=new int *[hei];
for (int i=0;i<hei;i++)
{
arra[i]=new int[wid];
}
/***赋值***/
for(int j=0;j<hei;j++)
{
for (int k=0;k<wid;k++)
{
arra[j][k]=j*10+k;
}
}
/***输出***/
cout<<setw(5);
for(int j=0;j<hei;j++)
{
for (int k=0;k<wid;k++)
{
cout<<arra[j][k]<<" ";
}
cout<<endl;
}
/***释放内存***/
for (int m=0;m<hei;m++)
{
delete [wid]arra[m];
arra[m]=NULL;
}
delete [hei] arra;
arra=NULL;
return 0;
}