2021-09-21 15:18:51 +02:00
|
|
|
# print-pyramid
|
|
|
|
|
2023-07-02 17:28:54 +02:00
|
|
|
Created by [@theoludwig](https://github.com/theoludwig) on 21 September 2021.
|
2021-09-21 15:18:51 +02:00
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
|
|
|
Display a pyramid of stars (`*`) whose height is given and in the right order (`normal` or `reverse`).
|
|
|
|
|
|
|
|
### Input
|
|
|
|
|
|
|
|
- **Line 1:** The string : `normal` or `reverse` to determine how to show the pyramid.
|
|
|
|
- **Line 2:** The integer : height of the pyramid.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
See the `test` folder for examples of input/output.
|
|
|
|
|
|
|
|
### Example 1
|
|
|
|
|
|
|
|
#### Input
|
|
|
|
|
|
|
|
```txt
|
|
|
|
normal
|
|
|
|
3
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Output
|
|
|
|
|
|
|
|
```txt
|
|
|
|
*
|
|
|
|
***
|
|
|
|
*****
|
|
|
|
```
|
|
|
|
|
|
|
|
### Example 2
|
|
|
|
|
|
|
|
#### Input
|
|
|
|
|
|
|
|
```txt
|
|
|
|
reverse
|
|
|
|
3
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Output
|
|
|
|
|
|
|
|
```txt
|
|
|
|
*****
|
|
|
|
***
|
|
|
|
*
|
|
|
|
```
|