Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to make a hollow box in c++ using whatever character a person enters. I w

ID: 3654350 • Letter: I

Question

I need to make a hollow box in c++ using whatever character a person enters. I was able to make the first box, but I'm stuck on making the hollow one. Heres the code so far to make the first box #include #include #include #include using namespace std; int main () { int height; int width; int count; int hcount; string character; cout << "input width" << endl; cin >> width; cout << "input height" << endl; cin >> height; cout << "input character" << endl; cin >> character; cout << " "; for (hcount = 0; hcount < height; hcount++) { for (count = 0; count < width; count++) cout << character; cout << endl; } getch(); return(0); } the other set of the code should make something like, but I'm stuck. Thanks for the help. (If I put 8 as the width, 4 for the height 9 for the character) 99999999 9 9 9 9 99999999

Explanation / Answer

#include #include using namespace std; const char symbol('$'); const char spacer(' '); void horizSide(const int len, const char c, const char spacer); int main(int argc, char *argv[]) { int size; cout > size; horizSide(size,symbol,spacer); for (int i = 0; i