** ** 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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images