program segitiga_pascal;
uses wincrt;
var input,i,j:word; isi:array[0..20,0..21] of word;
begin
writeln('Masukkan berapa tingkat segitiga pascal !');
readln(input);
isi[0,1]:=1;
for i:=1 to input do
begin
for j:=1 to i+1 do
begin
isi[i,j]:=isi[i-1,j]+isi[i-1,j-1];
write(isi[i,j],' ');
end;
writeln;
end;end.
Sabtu, 10 Desember 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar