Senin, 17 November 2008

Bermain Logika Perulangan dengan Pascal (Part II)

uses crt;

var i, j, k : integer;

a : char;

begin

clrscr;

a:='A';

k:=1;

for i:=4 downto 1 do

begin

for j:=1 to i do

begin

write(k,a,' ');

inc(a);

inc(k);

end;

writeln;

end;

readkey;

end.











uses crt;

var i, j, k : integer;

begin

clrscr;

k:=12;

i:=6;

while i<=9 do

begin

j:=i;

while j<=k do

begin

write(j,' ');

j:=j+2;

end;

writeln;

inc(i);

k:=k+3;

end;

readkey;

end.

Tidak ada komentar: