         IDENTIFICATION DIVISION.
         PROGRAM-ID. Oef2b.
         AUTHOR. LEVY.
         DATE-WRITTEN. 10-oktober-2004.
         ENVIRONMENT DIVISION.
         CONFIGURATION SECTION.
         SOURCE-COMPUTER. PC.
         OBJECT-COMPUTER. PC.
         DATA DIVISION.
         WORKING-STORAGE SECTION.
         01 LAYOUT.
           03 T1 PIC X(19) VALUE "Geef punten toets 1".
           03 T2 PIC X(19) VALUE "Geef punten toets 2".
           03 T3 PIC X(19) VALUE "Geef punten toets 3".
           03 T4 PIC X(19) VALUE "Geef punten toets 4".
           03 uit PIC X(18) VALUE "Het gemiddelde is:".
         01 TOETS PIC X.
         01 invoergegevens.
           03 i-T1 pic 99.
           03 i-T2 pic 99.
           03 i-T3 pic 99.
           03 i-T4 pic 99.
           03 gem pic 99.

         PROCEDURE DIVISION.

         HOOFDPROGRAMMA.

         DISPLAY SPACES UPON CRT
           DISPLAY T1 AT 0101
           display T2 at 0201
           display T3 at 0301
           display T4 at 0401
           accept i-T1 at 0121
           PERFORM WITH TEST before
           until i-T1>=0 and i-T1<11
           Display "het getal moet tussen 0 en 10 liggen" AT 0121
           display "                                    " at 0121
           accept i-T1 at 0121
           END-PERFORM
           accept i-T2 at 0221
           PERFORM WITH TEST before
           until i-T2>=0 and i-T2<11
           Display "het getal moet tussen 0 en 10 liggen" AT 0221
           display "                                    " at 0221
           accept i-T2 at 0221
           END-PERFORM
           accept i-T3 at 0321
           PERFORM WITH TEST before
           until i-T3>=0 and i-T3<11
           Display "het getal moet tussen 0 en 10 liggen" AT 0321
           display "                                    " at 0321
           accept i-T3 at 0321
           END-PERFORM
           accept i-T4 at 0421
           PERFORM WITH TEST before
           until i-T4>=0 and i-T4<11
           Display "het getal moet tussen 0 en 10 liggen" AT 0421
           display "                                    " at 0421
           accept i-T4 at 0421
           END-PERFORM
           compute gem = i-T1+i-T2+i-T3+i-T4
           compute gem = gem /4
           display gem at 0620
           if gem <= 04
               then display "<==SLECHT" at 0623
               end-if
           if gem=05
               then  display "<== Voldoende" at 0623
               end-if
           if gem >= 6 and <= 9
               then display "<=== Goed" at 0623
               end-if
           if gem=10
               then display "<=== uitstekend" at 0623
               end-if

           display uit at 0601

         ACCEPT TOETS AT 2030
         STOP RUN.
