#include<iostream>
#include<string>
using namespace std;
char card[100][100];
int main()
{
int w,h;
cin>>w>>h;
for(int i=0;i<w+2;i++)
for(int j=0;j<h+2;j++)
card[i][j]=' ';
for(int i=1;i<w+1;i++)
{
getchar();
for(int j=1;j<h+1;j++)
card[i][j]=getchar();
}
for(int i=0;i<w+2;i++)
{
for(int j=0;j<h+2;j++)
cout<<card[i][j];
cout<<endl;
}
system("pause");
return 0;
}
getcha函数的用法
最新推荐文章于 2024-02-07 22:54:04 发布