** ** Enter the number of rows 20 Enter the number of asterisks in the first row 1 Enter 1 if you want *'s to increase on each row, -1 for decrease, 0 for no increase 1 ** ***
IN C++
Problem 1 (Star patterns): Write a program Using loops to display the following patterns –
(i)
**********
(ii)
********************
(iii)
*
**
***
****
*****
******
*******
********
*********
**********
(iv)
*
**
***
****
*****
******
*******
********
*********
**********
***********
************
*************
**************
***************
****************
*****************
******************
*******************
********************
(v)
**********
*********
********
*******
******
*****
****
***
**
*
(vi)
********************
*******************
******************
*****************
****************
***************
**************
*************
************
***********
**********
*********
********
*******
******
*****
****
***
**
*
Your program should use loops to display all 6 patterns with one execution.
Input from the keyboard: the number of rows, the number of asterisks in the first row, 1 to increment asterisks in each following row, or -1 to decrement the number in the following rows, or 0 to keep the same number as in the first row.
![Sample screen dialog and output
HOMEWORK 5 Part 1
Enter the number of rows 1
Enter the number of asterisks in the first row 10
Enter 1 if you want *'s to increase on each row, -1 for decrease, 0 for no increase 0
**********
Enter the number of rows 1
Enter the number of asterisks in the first row 20
Enter 1 if you want *'s to increase on each row, -1 for decrease, 0 for no increase 0
关
Enter the number of rows 10
Enter the number of asterisks in the first row 1
Enter 1 if you want *'s to increase on each row, -1 for decrease, 0 for no increase 1
*
**
***
****
*****
******
*******
********
*********
**********
Enter the number of rows 20
Enter the number of asterisks in the first row 1
Enter 1 if you want *'s to increase on each row, -1 for decrease, 0 for no increase 1
*
**
***
****
*****
******
*******
********
关*
**********
***********
关
*************
**************
***************
****************
关*
关**
*******************
关](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fba28fbe0-fc04-46bc-bd01-9a9731588fb8%2Fdb7e56ad-3f9d-4797-965b-46cfa42a6c9f%2Flxn0y9_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)