profil

program "trójkąt Pascala"

poleca 91% 101 głosów

Treść
Grafika
Filmy
Komentarze

program trojkat_Pascala;
uses graph;
var karta,tryb,n,k:integer;
x,y:longInt;
ilS:string;
t:array[1..33] of longInt;
begin
karta:=detect; initGraph(karta, tryb, ');
setTextStyle(smallFont,0,1);
for n:=1 to 33 do t[n]:=0;
y:=1;
for n:=1 to 33 do
for k:=1 to n-1 do
begin
x:=y;
y:=t[k];
t[k]:=x+y;
setColor(t[k] mod 2+3);
str(t[k],ilS);
setUserCharSize(1,length(ilS) div 2,5,4);
outTextXY(320-10*n+k*20,12*n,ilS);
end;
readLn; closeGraph;
end.

Czy tekst był przydatny? Tak Nie