tell me what the Pascal's triangle is and I'll give the program.
Long since i did that program...Mail me the pattern at paulvictor@gmail.com.
The rows of Pascal's triangle are conventionally enumerated starting with row zero, and the numbers in odd rows are usually staggered relative to the numbers in even rows. A simple construction of the triangle proceeds in the following manner. On the zeroth row, write only the number 1. Then, to construct the elements of following rows, add the number directly above and to the left with the number directly above and to the right to find the new value. If either the number to the right or left is not present, substitute a zero in its place. For example, the first number in the first row is 0 + 1 = 1, whereas the numbers 1 and 3 in the third row are added
2007-08-03 01:18:44
·
answer #1
·
answered by Anonymous
·
0⤊
0⤋
write a function to calculate combination n, r
Then use it n times for each row of pascal triangle.
r=0,1,2,...,n
n=1,2,3,4,5,....
That is, calculate C(n;0),C(n;1),C(n;2),... C(n;n) for each row and output them.
2007-08-03 08:32:57
·
answer #2
·
answered by iyiogrenci 6
·
0⤊
0⤋