Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
code ChOut=8, CrLf=9, IntOut=11;
|
||||
|
||||
func Binomial(N, K);
|
||||
int N, K;
|
||||
int M, B, I;
|
||||
[M:= K;
|
||||
if K>N/2 the M:= N-K;
|
||||
B:=1;
|
||||
for I:= 1 to M do
|
||||
B:= B*(N-M+I)/I;
|
||||
return B;
|
||||
];
|
||||
|
||||
int N, K;
|
||||
[for N:= 0 to 9 do
|
||||
[for K:= 0 to 9 do
|
||||
[if N>=K then IntOut(0, Binomial(N,K));
|
||||
ChOut(0, 9\tab\);
|
||||
];
|
||||
CrLf(0);
|
||||
];
|
||||
] \Mr. Pascal's triangle!
|
||||
Loading…
Add table
Add a link
Reference in a new issue