Contoh
for k := 10 downto 1 do
u := u + k;
Contoh (1)
s =1+1/2+1/3+…+1/n
for k:= 1 to n do
begin
s := s+1/k;
end;
Contoh (2)
Program Keluaran
for i := -5 to 2 do -5
begin -4
writeln (i);
…
end; 2
write(huruf);
huruf := char(ord(huruf)+1);
Contoh (3)
Menghitung Xn
k := X;
while i < n - 1 do begin
k := k * X;
i := i + 1;
end;
writeln('Nilai ',X,'^',n,' = ', k);
Kalang
Repeat … Until
Kalang Repeat .. until
Bentuk Umum ;
Repeat
… Aksi
Until kondisi