program bintang;
uses winCrt;
procedure gb (brs,kol:integer);
var i,j:integer;
begin
for i:=1 to brs do
begin
for j:=1 to kol do
begin
if ((i=1)or(i=brs)or(j=1)or(j=kol))then
write ('*')
else write(' ');
end;
writeln;
end;
end;
var x,y:integer;
begin
write('banyak baris= ');readln(y);
write('banyak kolom= ');readln(x);
writeln('bentuknya:');
gb(y,x);
end.
Sabtu, 10 Desember 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar