Differences between revisions 2 and 3
Revision 2 as of 2007-03-09 21:39:00
Size: 580
Editor: KaiJaeger
Comment:
Revision 3 as of 2007-03-09 21:43:25
Size: 630
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Puzzles/PascalsTriangle

Pascal's triangle

In mathematics, Pascal's triangle is a geometric arrangement of the binomial coefficients in a triangle.

          1
        1   1
      1   2   1
    1   3   3   1
  1   4   6   4   1
1   5  10  10   5   1

The task

Write an APL function that takes argument and return a triangle like the one shown above. The argument defines the number of layers. The shown example has 6 layers, for example.

In APL, of course this can be done in a single line of APL.

>> [:PascalsTriangle/Solution:A solution]


CategoryPuzzle

PascalsTriangle/Task (last edited 2008-08-20 18:57:18 by anonymous)