11Angelav, пожалуйста, сделайте блок-схему
Const
Size=10;
Var
A:Array[1..Size+1,0..Size] of Integer;
i,j,n,m,k:Byte;
Inp,Outp:Text;
Begin
Assign(Inp,'Input.txt');
Reset(Inp);
Readln(Inp,n,m);
for i:=1 to n do
for j:=1 to m do
A[i,j]:=-1;
for i:=1 to n do A[i,0]:=0;
for j:=0 to m do A[n+1,j]:=0;
Repeat
Readln(Inp,i,j);
A[i,j]:=0;
Until EoF(Inp);
A[n,1]:=1;
Close(Inp);
For i:=1 to n+1 do
begin
For j:=0 to m do
write(A[i,j]:4);
Writeln;
end;
Writeln;
For i:=n downto 1 do
For j:=1 to m do
If A[i,j]=-1 then
A[i,j]:=A[i+1,j]+A[i,j-1]+A[i+1,j-1];
For i:=1 to n+1 do
begin
For j:=0 to m do
write(A[i,j]:4);
Writeln;
end;
Writeln;
Writeln('Press "Enter" to quit');
Readln;
Assign(Outp,'Output.txt');
Rewrite(Outp);
Writeln(Outp,A[1,m]);
Close(Outp);
End.
Const
Size=10;
Var
A:Array[1..Size+1,0..Size] of Integer;
i,j,n,m,k:Byte;
Inp,Outp:Text;
Begin
Assign(Inp,'Input.txt');
Reset(Inp);
Readln(Inp,n,m);
for i:=1 to n do
for j:=1 to m do
A[i,j]:=-1;
for i:=1 to n do A[i,0]:=0;
for j:=0 to m do A[n+1,j]:=0;
Repeat
Readln(Inp,i,j);
A[i,j]:=0;
Until EoF(Inp);
A[n,1]:=1;
Close(Inp);
For i:=1 to n+1 do
begin
For j:=0 to m do
write(A[i,j]:4);
Writeln;
end;
Writeln;
For i:=n downto 1 do
For j:=1 to m do
If A[i,j]=-1 then
A[i,j]:=A[i+1,j]+A[i,j-1]+A[i+1,j-1];
For i:=1 to n+1 do
begin
For j:=0 to m do
write(A[i,j]:4);
Writeln;
end;
Writeln;
Writeln('Press "Enter" to quit');
Readln;
Assign(Outp,'Output.txt');
Rewrite(Outp);
Writeln(Outp,A[1,m]);
Close(Outp);
End.