Untitled

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

int main()
{
    int w, h;
    cin >> w >> h;

    for (int i = 0; i < w; i++) {
        cout << '#';
    }
    cout << endl;
    for (int i = 0; i < (h - 2); i++) {
        cout << '#';
        for (int j = 0; j < (w - 2); j++) {
            cout << '*';
        }
        cout << '#';
        cout << endl;
    }
    for (int i = 0; i < w; i++) {
        cout << '#';
    }
}