This is the second disk of the PASCAL TUTOR system. It has the
Submitted By:
WEBMASTER
Rating:
(Not rated) (
Rate It)
(* Chapter 4 - Program 3 *)
program Loops_And_Ifs;
var Count,Index : integer;
begin (* Main program *)
for Count := 1 to 10 do begin (* Main loop *)
if Count < 6 then
Writeln('The loop counter is up to ',Count:4);
if Count = 8 then begin
for Index := 8 to 12 do begin (* Internal loop *)
Write('The internal loop index is ',Index:4);
Write(' and the main count is ',Count:4);
Writeln;
end; (* Internal loop *)
end; (* if Count = 8 condition *)
end; (* Main loop *)
end. (* Main program *)