Menu

[solved] – Question 8342

Concerning star patterns: I understand how to print a quantity of lines (containing an equivalent quantity of stars (or other characters), however how would I be able to print a selective number of stars in each line? In other words, the program will first ask the user to enter the total number of stars/characters to be displayed, and then it will repeatedly display the above pattern until the exact number is displayed (for example: input ‘6’ as total number, and the program will print:
*
**
***
*
)

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *