Welcome to DaniWeb! To allow us to help most effectively, please use code tags when you post code. Also, you should always comment code as much as you can. When you post code that isn't working, you should also show the incorrect output (or any errors that occur). I also suggest that you make a fully compilable example that demonstrates the problem (i.e. include main(), and hardcode values rather than taking user input).
Good luck,
David
daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
I would put an if statement in your second for loop for the empty rectangle and check to see if you are not on the top or the bottom of the rectangle. If you are not on the top or bottom then only place an Astrix on the ends otherwise place all Astrix.
NathanOliver
Veteran Poster
1,084 posts since Apr 2009
Reputation Points: 215
Solved Threads: 189
@ richieking He already has the algorithm to make a solid rectangle he is trying to make an empty one. Also what you have puts an extra Astrix on each line so your rectangle would be 10x21.
NathanOliver
Veteran Poster
1,084 posts since Apr 2009
Reputation Points: 215
Solved Threads: 189