|
+
|
... |
#include<iostream>
using namespace std;
int main(){
int H,W;
while(cin >> H >> W, H||W){
for(int j = 0; j < W; j++){
cout << "#" ;
}
cout << endl;
for(int i = 1; i < H - 1; i++){
for(int j = 0; j < W; j++){
if(j == 0 || j == W - 1) cout << "#" ;
else cout << "." ;
}
cout << endl;
}
for(int j = 0; j < W; j++){
cout << "#" ;
}
cout << endl << endl;
}
return 0;
}
|