Basic Examples (2)
Basic Examples
(2)
Display the first five rows of Pascal's triangle:
In[22]:=
Out[22]=
1 | ||||||||
1 | 1 | |||||||
1 | 2 | 1 | ||||||
1 | 3 | 3 | 1 | |||||
1 | 4 | 6 | 4 | 1 |
———
Display the first seven rows of Pascal's triangle:
In[33]:=
Out[33]=
1 | ||||||||||||
1 | 1 | |||||||||||
1 | 2 | 1 | ||||||||||
1 | 3 | 3 | 1 | |||||||||
1 | 4 | 6 | 4 | 1 | ||||||||
1 | 5 | 10 | 10 | 5 | 1 | |||||||
1 | 6 | 15 | 20 | 15 | 6 | 1 |