langsung aja ya lagi males nulis hahaha
program for_to_do;
uses crt;
var
x,y,z : integer;
begin
clrscr;
write ('masukan jumlah baris: ');
readln(x);
for y:=1 to x do
begin
for z:=1 to x-y do
begin
write(' ');
end;
for z:=1 to y do
begin
write('* ');
end;
writeln();
end;
readln();
end.
hasil outputnya
program for_to_do;
uses crt;
var
x,y,z : integer;
begin
clrscr;
write ('masukan jumlah baris: ');
readln(x);
for y:=1 to x do
begin
for z:=1 to x-y do
begin
write(' ');
end;
for z:=1 to y do
begin
write('* ');
end;
writeln();
end;
readln();
end.
hasil outputnya
0 komentar:
Posting Komentar