-->
当前位置:首页 > 题库

PROGRAMMING:Mathematical thought -- Yang Hui's triangle

Luz5年前 (2021-05-10)题库494
The definition of Yang Hui triangle is given below
1. Each number is equal to the sum of the two numbers above it.
2. The numbers in each line are symmetrical and gradually increase from 1.
Enter an integer h to print Yang Hui triangle with H rows.
###Input format:
Enter an integer H
###Output format:
Yang Hui triangle with H output lines
###Input example:
Here is a set of inputs. For example:
```in
five
```
###Output example:
The corresponding output is given here. For example:
```out
one
1 1
1 2 1
1 3 3 1
1 4 6 4 1
```







answer:If there is no answer, please comment