       IDENTIFICATION DIVISION.
        PROGRAM-ID.OEFENING-8.
        AUTHOR.De Vos Levy.
        DATE-WRITTEN.november-1-2004.

       ENVIRONMENT DIVISION.
        CONFIGURATION SECTION.
        SOURCE-COMPUTER.PC.
        OBJECT-COMPUTER.PC.

       DATA DIVISION.
        WORKING-STORAGE SECTION.
        01 invoer.
           03 A PIC 9(6).
           03 B PIC 9(6).
           03 C PIC 9(6).


        01 keuze.
           03 keuzenum PIC 9.
        01 uitvoer.
           03 res PIC 9(6).
           03 rescomp PIC 9(6).

        01 antwoord pic X value 'N'.

        77 TOETS PIC X.

        SCREEN SECTION.
         copy "oef8.TXT".

       PROCEDURE DIVISION.
       HOOFDPROGRAMMA.
       perform body with test after until antwoord="N" or "n".
       Stop run.
       body.
       perform uitvoer-scherm-1 thru invoer-antwoord.
       uitvoer-scherm-1.
               display G-OEF8SRN
               .
       gegevens-inlezen.
               accept A at 0810
               accept B at 0910
               accept keuzenum at 0657
               .
       resultaat-weergeven.
               if keuzenum=1
                   then add A to B giving res
                   compute rescomp=A+B
               end-if
               if keuzenum=2
                   then subtract B from A giving res
                   compute rescomp=A - B
               end-if
               if keuzenum=3
                   then multiply A BY B giving res
                   compute rescomp=A*B
               end-if
               if keuzenum=4
                   then divide A by B giving res
                   compute rescomp= A/B
               end-if
               if keuzenum=5
                   then divide a by b giving res remainder c
                   display "de rest is" at 1440
                   display c at 1450
               end-if
                   display res at 1430
                   display rescomp at 1530
               .
       invoer-antwoord.
           accept antwoord at 1850
                 accept toets at 2168.

       .
