Write a program that uses for statements to print the following separately, one
ID: 3617188 • Letter: W
Question
Write a program that uses for statements to print the following separately,
one below the other. Use for loops to generate the patterns. All asterisks
should be printed by a single statement of the form
( cout << '*'; and cout << " " ).
*
**
***
****
*****
******
*******
********
*********
**********
**********
*********
********
*******
******
*****
****
***
**
*
**********
*********
********
*******
******
*****
****
***
**
*
*
**
***
****
*****
******
*******
********
*********
**********
Combine your code with the question above to print the triangles
side by side as shown below:
* ********** ********** *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********