Im lost on this home work i have the first part of it done but i have no clue of how to do the second part of it here is the problem would be awesome if you could help!
"In this exercise, you create a program that uses two nested loops to display two different patterns of
asterisks: Pattern 1 contains nine rows of asterisks as follows: nine asterisks, eight asterisks, seven
asterisks, six asterisks, five asterisks, four asterisks, three asterisks, two asterisks, and one asterisk.
Pattern 2 contains nine rows of asterisks as follows: one asterisk, two asterisks, three
asterisks, four asterisks, five asterisks, six asterisks, seven asterisks, eight asterisks, and nine asterisks.
Use whatever type of loops you feel would be most appropriate."
Pattern 2 contains nine rows of asterisks as follows: one asterisk, two asterisks, three asterisks, four asterisks, five asterisks, six asterisks, seven asterisks, eight asterisks, and nine asterisks.
although your pattern consists of ten rows going from 1 to ten asterisks, which is one row too many.
The first part, "Pattern 1 contains nine rows of asterisks as follows: nine asterisks, eight asterisks, seven asterisks, six asterisks, five asterisks, four asterisks, three asterisks, two asterisks, and one asterisk. " is almost identical to the second.
Forget about the patterns for a moment. Just think about counting up from 1 to 9. Then think about counting down from 9 to 1.
for (int i = 1; i <=9; i++)
Here, the start value is 1, the end value is 9, and the variable i is incremented each time.
To count down again, you need: start value is 9, the end value is 1, and the variable i is decremented each time. You will also need to change the <= to >=.