Jumat, 19 November 2010

program bintang piramit


Program bintang_piramid;

Var c,a,b,n : integer;
begin
write(‘masukan angka genap sembarang utk menunjukkan baris pyramid’);
readln(n);
writeln;
for a := 1 to (n div 2)+1 do
begin
for b := 1 to (n div 2)+(1-a) do
write(‘ ‘);
for c := 1 to (a*2)-1 do
write(‘*’);
writeln;
end;
end.

Tidak ada komentar:

Posting Komentar