Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const N = 10;
- M = 6;
- var A : array [1..N, 1..M] of integer;
- i, j : integer;
- begin
- for i := 1 to N do A[i, M] := 1;
- for j := 1 to M do A[N, j] := 1;
- for i := 1 to N do
- for j := 1 to M do
- A[i,j] := A[i+1,j] + A[i,j+1];
- writeln(A[1,1]);
Advertisement
Add Comment
Please, Sign In to add comment