#include <iostream>
using namespace std;

void solid_box(short wide, short high);
void hollow_box(short wide, short high);

inline void pause(void)
{
    char t;
    cout << "Press a key and Enter to continue:  ";
    cin >> t;
    return;
}

int main(void)
{
    cout << "A solid box 4x10:\n\n";
    solid_box(10, 4);
    pause();
    cout << "A hollow box 6x25:\n\n";
    hollow_box(25, 6);
    pause();
    return 0;
}

void solid_box(short wide, short high)
{
    short w, h;
    for (h = 0; h != high; h++)
    {
        for (w = 0; w != wide; w++)
        {
            cout << '*';
        }
        cout << endl;
    }
    return;
}

void hollow_box(short wide, short high)
{
    short w, h;
    for (w = 0; w != wide; w++)    // top
    {
        cout << '*';
    }
    cout << endl;
    for (h = 1; h != high-1; h++)
    {
        cout << '*';                    // side
        for (w = 1; w != wide-1; w++)    // hollow middle
        {
            cout << ' ';
        }
        cout << '*' << endl;            // side
    }
    for (w = 0; w != wide; w++)    // bottom
    {
        cout << '*';
    }
    cout << endl;
    return;
}
