home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STEN / STEN10.MSA / PROGRAMS / PASCAL / ODDNUMS.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2010-04-21  |  489 b   |  23 lines

  1. PROGRAM Odd_Numbers;
  2.  
  3. {       This program displays all the
  4.         odd numbers between 0 and 39
  5.         using the REPEAT & UNTIL
  6.         commands.  Written by Roy Mc
  7.         Partland 15/10/91, Saved as
  8.         ODDNUMS.PAS                       }
  9.  
  10. USES
  11.     CRT;
  12.  
  13. VAR
  14.     Number  : Real;
  15.  
  16. BEGIN {Main program starts here}
  17.      Number:= 1;
  18.      WRITELN (Number:2:0);
  19.       REPEAT
  20.        Number:= Number + 2;
  21.        WRITELN (Number:2:0);
  22.       UNTIL (Number = 39);
  23. END.ə