Ni source kodenyalangsung copy ke pascal :
program square;
uses wincrt;
var
N ,i,j : integer;
lagi:char;
begin
repeat
clrscr;
writeln('------------------------------');
writeln(' program mencetak huruf O ');
writeln('------------------------------');
writeln;
write('Masukkan Angka : ');readln(N);
writeln;
writeln('Hasilnya : ');
writeln;
for i:= 1 to N do
begin
for j:=1 to n do
begin
if (i=1) or (j=1) or(j=n) or (i=n) then
write('*')
else
write(' ');
end;
writeln;
end;
writeln;
write('Ulang ? (y/t): ');readln(lagi);
until (lagi='t') or (lagi='T');
donewincrt;
end.
program square;
uses wincrt;
var
N ,i,j : integer;
lagi:char;
begin
repeat
clrscr;
writeln('------------------------------');
writeln(' program mencetak huruf O ');
writeln('------------------------------');
writeln;
write('Masukkan Angka : ');readln(N);
writeln;
writeln('Hasilnya : ');
writeln;
for i:= 1 to N do
begin
for j:=1 to n do
begin
if (i=1) or (j=1) or(j=n) or (i=n) then
write('*')
else
write(' ');
end;
writeln;
end;
writeln;
write('Ulang ? (y/t): ');readln(lagi);
until (lagi='t') or (lagi='T');
donewincrt;
end.
0 comments:
Posting Komentar