Hello, I must be having Alzheimer's or something because I just can't seem to remember how to display this program properly.. I am supposed to display a pattern like this:
Well you have two problems that i can spot. cout << ' +'; that space before the + is a problem as you're trying to print it as a single character...I'm not even sure what that will do but it won't make much sense. Make it '+' without the space or if you really want the space print it as a string literal " +" in double quotes.
Now that you're printing the characters properly, you need to decrease the amount of + signs that you print each loop (change the star_1 loop). You currently loop from 1 to 10 10 times so that'll print this
Hint: First row has 1 star, second row has 2, and so on ... Thus: If you index rows as 1, 2, ..., K where K is some integer (in this example, 6), then Row N has N stars. (except for row 6. I think that's a typo).
Pattern B
Hint: First row has 5 stars, second row has 4, and so on down to 1. Thus: If you index the rows as K, K - 1, K - 2, ..., 1 where K is some integer (in this example, 5), then Row N has N stars.
Alright, so I partly got it. (Sorry for the late post) When following the hint shacknar gave, I accidently got the pattern for Pattern B instead. So I know what I need to do now, thanks for the help.