kata-kata bijak tingkat tinggi Follow @goruberkata https://twitter.com/goruberkata

Sabtu, 22 Oktober 2011

Contoh soal Looping

ini Codingannya................ckckckckcckckcck coba aja di test

uses crt;
var i,j,n : integer;
begin
clrscr;
for i:= 1 to 3 do
begin
for j:= 1 to 4-i do
begin
write (' ');
end;
for n:= 1 to (2*i)+2 do
begin
write ('*');
end;
writeln();
end;
begin
for i:=1 to 10 do write ('*');
writeln;
for i:= 1 to 2 do
begin
write ('*');
for j:=1 to 8 do
begin write ('*');
end;
writeln ('*');
end;
for i:= 1 to 10 do
write ('*');
writeln;
end;
begin
for i:= 3 downto 1 do
begin
for j:= 1 to 4-i do
begin
write (' ');
end;
for n:= 1 to (2*i)+2 do
begin
write ('*');
end;
writeln();
end;
readkey;
end;
readln;
end.
Comments
0 Comments

0 komentar:

Posting Komentar