Show what you done and describe what help you need. Post a sample run, too.
Type: Posts; User: GregBrannon
Show what you done and describe what help you need. Post a sample run, too.
Really? Here's my for loop. Not that bad . . .
for ( int i = 0 ; i < rows * squareSize ; i++ )
{
// start every row in the block with the same character
...
Since I suggested it . . .
My approach:
- The size of the square defines the height or number of rows in a 'block' of output
- Each row in a block of output begins with the same character,...
@andbin: Now I understand why you suggested 4 loops. I was trying to figure out why so many were needed, but I was stuck in my own design idea, and I love the math.
You're also missing some simple math required to make the loops work. Your specification is a little confusing, but if you think it through, then the user's input
2 3 5 *
is a 2 x 3...