PATTERN PRINTING

I am getting an error on line 32 and I am not sure why
assignment:
Write a program that uses nested loop or for statements to display Pattern A below, followed by an empty line and then another set of loops that displays Pattern B. Once again no setw implementation is allowed here but you must use nested loop or for statements with proper indentation to generate these patterns. Use meaningful variable identifier names, good prompting messages and appropriate comments for each loop segment as well as other sections in the body of your program.



Pattern A

+
+++
+++++
+++++++
+++++++++
+++++++++++
+++++++++++++

Pattern B

+++++++++++++
+++++++++++
+++++++++
+++++++
+++++
+++
+

[code]
#include <iostream>
using namespace std;

Last edited on
Hello cristina999,

You are missing a semi-colon on line 30.

Hope that helps,

Andy
Do you have any suggestions as to how to fix Pattern B when the program runs it keeps on displaying git non stop
Hello cristina999,

Upon further investigation I found that the for loop at line 25 is written incorrectly. The center section is missing the compare. Also "Pattern B" is a duplicate of pattern A not the opposite.

Working on the correction.

Hope that helps,

Andy

Edit: Line 25 works better written as for (symbol_B = 13; symbol_B >= row_B; symbol_B--)
Last edited on
Topic archived. No new replies allowed.