You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/1_002e12

17 lines
399 B

Exercise 1.12: The following pattern of numbers
is called
Pascal’s triangle.
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
. . .
The numbers at the edge of the triangle are all 1, and each number inside the
triangle is the sum of the two numbers above it.35 Write a procedure that computes elements of Pascal’s triangle by
means of a recursive process.