Write a program using for loops to produce the following output. Please read carefully the entire specification! Your program must work for any odd number entered by the user, not just 13.
Enter an odd number width: 13
Hill:
*
***
*****
*******
*********
***********
*************
Triangle:
*
***
*****
*******
*********
***********
*************
Diamond:
*
***
*****
*******
*********
***********
*************
***********
*********
*******
*****
***
*
Start with the Hill. Each line must be printed with a 1 for loop. Figure out how to print a line of stars, printing 1 star at a time. The number of lines is controlled by a for loop around that loop and prints each line
To print the Triangle, figure out how to print an upside down Hill, like this
*******
*****
***
*
Then, change the star * to a single space! Each line should be printed with more than 1 for loop, which is embedded in anotherfor loop that prints multiple lines (i.e. the top 6 lines). This diagram might help:
Finally, to print the Diamond, print the Triangle for the top, and then use similar, sort of backward for loops to produce the bottom of the Diamond.