program seling;
uses wincrt;
var i,j,n:integer;
a:string;
begin
write ('banyak baris ');
readln (n);
for i:=1 to n do
begin
for j:=1 to i do
begin
if (j mod 2)=1 then
a:='*' else a:='1';
write(a,' ');
end;
writeln;end; end.
program bintang turun;
uses wincrt;
var i,n,j:integer;
begin readln (n);
for i:=1 to n do
begin for j:=1 to n do
begin if (j<i) then
write (' ') else
write ('*');
end;
writeln;
end;
end.
program angka;
uses wincrt;
var i,j,n,a:integer;
begin
write ('banyak suku ');
readln (n); a:=0;
for i:=1 to (n div 4)+1 do
begin
for j:=1 to 4 do
begin
a:=a+1;
if a<=n then
write (a,' ') else write(' ');
end;
writeln;
end;
end.
Tidak ada komentar:
Posting Komentar