Alice studies symbolic graphics. First, she wanted to draw a right triangle with legs equal to 5. Write a
triangle_down()
routine for Alice to draw this triangle.
*
**
***
****
*****
Then, Alice wants to draw an inverted right triangle with legs equal to 5. Write Alice a subroutine
triangle_up()
to draw this triangle.
*****
****
***
**
*
After some thought, Alice decided that she could use your subroutines to draw the next shape.
*****
****
***
**
*
*
**
***
****
*****
Write a subroutine
star_figure()
that would display this figure using the above subroutines.
The main program should contain only one line - subroutine call
star_figure().
Examples
# |
Input |
Output |
1 |
|
*****
****
***
**
*
*
**
***
****
*****
|