program looping;
uses wincrt;
var i,j: integer;
begin
for i:= 1 to 5 do
begin
writeln(' ');
for j:= 1 to 4 do
begin
write(' ',i+j,'-',j,'=',i-j:2);
end;
writeln;
end;
end.
=============================================================
program looping;
uses wincrt;
var i,j: integer;
begin
for j:= 1 to 6 do
begin
writeln(' ');
for i:= 1 to 5 do
begin
write(' ',i,'*',j,'=',i*j:2);
end;
writeln;
end;
end.
=============================================================
program looping;
uses wincrt;
var i,j: integer;
begin
j:=1;
while j<=5 do begin
i:=1;
while i<=4 do begin
write(' ',i,'x',j,'=',i*j:2);
i:=i+1;
end;
writeln;
j:=j+1;
end;
end.
Tidak ada komentar:
Posting Komentar