#include <iostream>
using namespace std;

enum starBoxType { solid, hollow, twoTriangles };

starBoxType enter_type()
{
  int i;
  cout << "Which type of box? " << endl;
  cout << "  0..solid" << endl;
  cout << "  1..hollow" << endl;
  cout << "  2..two triangles" << endl;
  cin >> i;
  return static_cast<starBoxType>(i);
}

void printhollowbox(int s)
{
  int x,y;
  for (y=0;y<s;y++) {
    for (x=0;x<s;x++) 
      if ((x==0)||(x==(s-1))||(y==0)||(y==s-1)) cout << "*";
      else cout << " ";
    cout << endl;
  }
}

void printsolidbox(int s)
{
  int x,y;
  for (y=0;y<s;y++) {
    for (x=0;x<s;x++) cout << "*";
    cout << endl;
  }
}

void printttbox(int s)
{
  int x,y;
  for (y=0;y<s;y++) {
    for (x=0;x<s;x++) 
      if (x==y) cout << " ";
      else cout << "*";
    cout << endl;
  }
}

int main() {

  int size;
 
  starBoxType whichBox = enter_type();

  cout << "What size? ";
  cin >> size;

  switch (whichBox)
  {
    case solid: printsolidbox(size); break;
    case hollow: printhollowbox(size); break;
    case twoTriangles: printttbox(size); break;
  }
 
  return 0;
}
