Ini source codenya :
uses wincrt;
var
a,b,c : integer;
lagi : char;
begin
repeat
clrscr;
writeln('------------------------------');
writeln(' program mencetak huruf B ');
writeln('------------------------------');
writeln;
writeln;
writeln('Hasilnya : ');
writeln;
for a:=1 to b-1 do
begin
write('*');
end;
writeln;
for a:= 1 to b div 2-1 do
begin
for c:=1 to 1 do
begin
write('*');
end;
for c:=2 to b-1 do
begin
write(' ');
end;
writeln('*');
end;
for a:=1 to b-1 do
begin
write('*');
end;
writeln;
for a:= 1 to b div 2-1 do
begin
for c:=1 to 1 do
begin
write('*');
end;
for c:=2 to b-1 do
begin
write(' ');
end;
writeln('*');
end;
for a:=1 to b-1 do
begin
write('*');
end;
writeln;
writeln;
write('Ulangi ?(y/t) : ');readln(lagi);
until (lagi='t') or (lagi='T');
donewincrt;
end.
Running program :
0 comments:
Posting Komentar