exercism/go/pascals-triangle
Brian Buller 50f4a86fd8 Initial Commit 2016-08-13 18:20:14 -05:00
..
README.md Initial Commit 2016-08-13 18:20:14 -05:00
pascal.go Initial Commit 2016-08-13 18:20:14 -05:00
pascal_printer Initial Commit 2016-08-13 18:20:14 -05:00
pascal_printer.go Initial Commit 2016-08-13 18:20:14 -05:00
pascals_triangle_test.go Initial Commit 2016-08-13 18:20:14 -05:00

README.md

Pascals Triangle

Write a program that computes Pascal's triangle up to a given number of rows.

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

To run the tests simply run the command go test in the exercise directory.

If the test suite contains benchmarks, you can run these with the -bench flag:

go test -bench .

For more detailed info about the Go track see the help page.

Source

Pascal's Triangle at Wolfram Math World view source