Untitled

Anonymous
c_cpp
10/15/2023 9:23 AM
592 B
22
Indexable
#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 << '#';
    }
}
Editor is loading...