Ni source codenya :
program bintang;
uses wincrt;
var a, n, b : integer;
begin
writeln('************************************');
writeln('* Program segitiga bintang menurun *');
writeln('************************************');
write ('Masukkan angka : '); readln (n);
writeln;
writeln('Hasilnya : ');
for a := n downto 1 do
begin
for b := 1 to a do
begin
write ('*');
end;
writeln;
end;
end.
Ni gambar running programnya :
program bintang;
uses wincrt;
var a, n, b : integer;
begin
writeln('************************************');
writeln('* Program segitiga bintang menurun *');
writeln('************************************');
write ('Masukkan angka : '); readln (n);
writeln;
writeln('Hasilnya : ');
for a := n downto 1 do
begin
for b := 1 to a do
begin
write ('*');
end;
writeln;
end;
end.
Ni gambar running programnya :
0 comments:
Posting Komentar