*Selamat Datang di Bang Tiyo's Blog*

Jumat, 19 November 2010

Program pascal Bintang piramida

Program bintang_piramid;
Uses wincrt;
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