MEMBUAT PROGRAM PIRAMIDA "PROGRAM PASCAL"
uses crt;
var
i,j,k,l,g,z,x : integer;
andi,pilih: integer;
begin clrscr;
writeln('Program segitiga');
write('masukka berapa banyak jumlahnya : '); readln(andi);
for i:= 1 to andi do
begin
for j := i to andi do
write(' ');
begin
for k:= 1 to i do
write(' * ');
end;
writeln;
end ;
readln;
end.
berikut hasil runnya :
No comments:
Post a Comment