Tuesday, June 12, 2012

Pascal "Segitiga"

,
uses crt;
var a, i , j : integer;
begin
     clrscr;
     write ('masukkan angka : '); readln (a);
     for i := 1 to a-1 do
     begin
     for j := 1 to i do
     write (j);
     writeln;
     end;
     for i := a downto 1 do
     begin
     for j := 1 to i do
     write(j);
     writeln;
     end;
     readln;
end.

Output :


0 comments to “ Pascal "Segitiga" ”

Post a Comment