Evo jedno resenje, ali probaj ubuduce da sam resis problem, pa ako ti ne ide da postavis konkretno pitanje.
lp, ss.
Code:
program MojDomaciZadatak;
const
MAX = 20;
var
i, j: integer;
a1: array[0..MAX] of integer;
a2: array[0..MAX] of integer;
begin
a1[1] := 1;
for i := 0 to MAX do
begin
for j := 1 to i do
begin
a2[j] := a1[j-1] + a1[j];
write(a2[j], ' ');
end;
for j := 1 to i do a1[j] := a2[j];
writeln;
end;
readln;
end.
When something is hard to do, then it's not worth doing.