       IDENTIFICATION DIVISION.
       PROGRAM-ID. FEBSEQ.
       AUTHOR. GREG. MANLEY.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       77 FIB0             PIC 9(9) VALUE 0.
       77 FIB1             PIC 9(9) VALUE 1.
       77 NEXTFIB          PIC 9(9).

       77 COUNTTO          PIC 9(3).

       PROCEDURE DIVISION.
           ACCEPT COUNTTO FROM COMMAND-LINE.
           SUBTRACT 3 FROM COUNTTO GIVING COUNTTO.
           DISPLAY FIB0.
           DISPLAY FIB1.
           PERFORM FIB UNTIL COUNTTO = 0.

       FIB.
           COMPUTE NEXTFIB = FIB0 + FIB1.
           ADD FIB1 TO 0 GIVING FIB0.
           ADD NEXTFIB TO 0 GIVING FIB1.
           DISPLAY NEXTFIB.
           SUBTRACT 1 FROM COUNTTO GIVING COUNTTO.
      