I am trying to make a hollow box. I have searched the forums and found the answers. But the answers do not help me understand how it works. I need help in the form of hints on how to make hollow squares. I am starting to learn c++ and I can't seem to get by the basics. Anywho....here is what I have so far.
I think I am on the right track but I am missing something. I am re-reading the chapter (C++ How to Program: Deitel) and gonna keep trying to do this on my own.....Please don't just post an answer.Code:#include <iostream> using std::cout; using std::cin; using std::endl; int main() { int row,col,rowcounter,colcounter,x,z; cout <<"How many rows?" <<endl; cin >>row; cout <<"How many columns?"<<endl; cin >>col; for (rowcounter=1; rowcounter <= row; ++rowcounter) { cout <<"* "; } cout <<endl; for (colcounter=2; colcounter <= col; ++colcounter) { cout <<"*" <<endl; } cout <<endl; cin >> z; return 0; }