Tag: piramid

Tag: piramid

Pascal : Coding Bintang Piramid
Image December 21, 2019 Ari Usman,Artikel Komputer,Pascal admin

Program Bintang1;uses crt;var i,j,n:integer;beginclrscr;writeln(‘———————————————–‘);writeln(‘ PROGRAM BINTANG BERBENTUK PIRAMID ‘);writeln(‘———————————————–‘);write(‘masukkan nilai = ‘); readln (n);for i:=1 to n dobeginif (i mod 2 = 1) thenbeginfor j:=1 to ((n-i) div 2) do write(‘ ‘);for j:=1 to i do write(‘*’);writeln;end;end;readln;readkey;end.

Details