home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PASSRC.ZIP / REPEATLP.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-04  |  841b  |  34 lines

  1.                                 (* Chapter 4 - Program 6 *)
  2. program Repeat_Loop_Example;
  3.  
  4. var Count : integer;
  5.  
  6. begin
  7.    Count := 4;
  8.    repeat
  9.       Write('This is in the ');
  10.       Write('repeat loop, and ');
  11.       Write('the index is',Count:4);
  12.       Writeln;
  13.       Count := Count + 2;
  14.    until Count = 20;
  15.    Writeln(' We have completed the loop ');
  16. end.
  17.  
  18.  
  19.  
  20.  
  21. { Result of execution
  22.  
  23. This is in the repeat loop, and the index is   4
  24. This is in the repeat loop, and the index is   6
  25. This is in the repeat loop, and the index is   8
  26. This is in the repeat loop, and the index is  10
  27. This is in the repeat loop, and the index is  12
  28. This is in the repeat loop, and the index is  14
  29. This is in the repeat loop, and the index is  16
  30. This is in the repeat loop, and the index is  18
  31.  We have completed the loop
  32.  
  33. }
  34.