Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
442 B
3
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 << '#';
    }
}