暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Lorenz Bung dcaf35dcff Added Comments in task1. Inserted basic data structures in task3. 8 年前
..
src Added Comments in task1. Inserted basic data structures in task3. 8 年前
tests Init task3 8 年前
Cargo.toml Added Comments in task1. Inserted basic data structures in task3. 8 年前
README.md Comment to not use any existing crates 8 年前

README.md

Homework hw2 task3

prepare your task

Run the cargo command to prepare your task3/ directory as a library

task

Compute Pascal’s triangle up to a given number of rows. Create the new type PascalsTriangle and implement the methods new() and rows(). See the tests/task3.rs for more informationen about parameters and returns of the methods. Do not use any crates.

In Pascal’s Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row.

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1
# ... etc