Поле

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
386 B
0
Indexable
Never
#include <iostream>
#include <math.h>
using namespace std;

int main() {
	int W, H;

	cin >> W >> H;

	for (int i = 0; i < H; i++) {
		cout << "#";
	}
	cout << "\n";

	for (int w = 0; w < W - 2; w++) {
		cout << "#";
		for (int h = 0; h < H - 2; h++) {
			cout << " ";
		}
		cout << "#";
		cout << "\n";
	}
	for (int i = 0; i < H; i++) {
		cout << "#";
	}
}