Dze je subor www.TrSek.com/cover/benkovic/pastroj.pas
{ PASTROJ.PAS                            Copyright (c) Jan Benkovic }
{ Zobrazi pascalov trojuholnik.                                     }
{                                                                   }
{ Datum:15.10.1998                             http://www.trsek.com }

uses crt;

const
 MaxR = 15;

var
 ir : array[1..MaxR] of integer;
 n,i,j : integer;

begin
 clrscr;
 for i:= 1 to MaxR do ir[i]:=0;
 Writeln('Pascalov trojuholnik');
 Writeln('--------------------');
 repeat
  Write('Zadaj pocet riadkov (1 - ',MaxR,'): ');
  readln(n);
  if (n < 1) or (n>MaxR) then Writeln('Fuuj');
 until (n>= 1) and (n<=MaxR);
 for i:= 1 to n do begin
  ir[i]:= 1;
  for j:= i-1 downto 2 do ir[j]:= ir[j]+ir[j-1];
  for j:= 1 to i do write(ir[j]:5);
  writeln;
 end;
 readkey;
end.

Copyrigth by Zdeno Sekerak 2007, http://www.trsek.com