LATIHAN_PRA-UTS 1.b
program star_ascending_descending;
uses crt;
var
n,i,j : integer;
begin
write('Masukkan
angka untuk mencetak bintang : ');readln(n);
for i := n downto 1 do
begin
for
j := 1 to i do
begin
write
('*');
end;
writeln
( );
end;
for i := 1 to n do
begin
for
j := 1 to i do
begin
write
('*');
end;
writeln ( );
end;
readln;
end.
No comments:
Post a Comment