the following code that I have written only takes me about half way there
Excellent. Now do the same thing again, but this time reverse your starting and ending points, and count down instead of up.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,483
Solved Threads: 1,407
Skill Endorsements: 55
Hello infiniteloop56,
Use separate nested for loops for top and bottom patterns. Have one nested for loop for the top pattern and have separate nested for loop for the bottom pattern.
The one below is for bottom pattern...
for(c = 0; c < numb; c++)
{
for(d = numb-1; d > c; d--)
{
cout << x;
}
}
In your code the for loop in line 36 will not function . numb4 will always be greater than numb3. Check the condition in that for loop and accordingly increment or decrement.
Arbus
Practically a Master Poster
615 posts since Dec 2010
Reputation Points: 45
Solved Threads: 31
Skill Endorsements: 0