program bintang_selang_seling;
uses wincrt;
var
i,j,n:integer;
begin
write(' Masukkan inputan = ');readln(n);
for i:=1 to n do
begin
if i mod 2 =1 then
begin
for j:=1 to n do
begin
if j mod 2=1 then
write('*')
else
write(' ');
end;
writeln;
end
else
begin
for j:=1 to n do
begin
if j mod 2=0 then
write('*')
else
write(' ');
end;
writeln;
end;
end;
readln;
end.
Tidak ada komentar:
Posting Komentar
Kirim Komentar Anda
(Send Your Comment)