Hi
Two suggestions:
1. You could either split your loop into 3 parts:
"top", a loop to create your "** **" structure, "bottom"
2. A slower method would be to replace
with a few if-statements, likeCode:cout << "*";
I am sure you could have worked this out by your own ?Code:if ( (row%(maxRow-1)!=0) && ( column > 1) && (column<maxCol-2) ) cout << " "; else cout << "*";
Cheers





Reply With Quote