
       identification division.
       program-id.Opgave-10.
       author.
       date-written.
       environment division.
       configuration section.
       source-computer.PC.
       object-computer.PC.
       data division.
       working-storage section.
           01 onderdelen.
            03 artikelnummer pic 9(6).
            03 omschrijving PIC X(30).
            03 aankoopprijs pic 9(4).
            03 winstper pic 99.
            03 verkoopprijs pic 9(4).
            03 keuze pic 9.
            03 toets pic X.
       screen section.
           copy "schermb.TXT".
           copy "scherm0.TXT".
           copy "schermb1.TXT".
           copy "schermb2.TXT".
           copy "schermb3.TXT".


       procedure division.

       hoofdprogramma.
       perform v-keuze-m-scherm-0.
       perform v-input-body-m-output-body.
       Stop run.

       v-keuze-m-scherm-0.
           display G-SCHERM0
           accept keuze at 1621
           .
       v-input-body-m-output-body.
              perform v-i-record-m-o-record with test after until
              keuze=0.
              Stop run.
            .

       v-i-record-m-o-record.
           perform v-input-keuze-m-output-keuze.
           perform v-keuze-m-scherm-0.
           stop run.
           .

       v-input-keuze-m-output-keuze.
           if keuze=1
           then perform v-input-1-m-output-1 with test after until
           toets="N" or "n"
           end-if
           if keuze=2
           then perform v-input-2-m-output-2 with test after until
           toets="N" or "n"
           end-if
           if keuze=3
           then perform v-input-3-m-output-3 with test after until
           toets="N" or "n"
           end-if
          .
       v-input-1-m-output-1.
           display G-SCHERMB1
           accept artikelnummer at 0830
           accept omschrijving at 0930
           accept aankoopprijs at 1030
           accept winstper at 1135
           compute verkoopprijs=aankoopprijs*(1+winstper/100)
           display verkoopprijs at 1430
           accept toets at 1740
       .
       v-input-2-m-output-2.
           display G-SCHERMB2
           accept artikelnummer at 0830
           accept omschrijving at 0930
           accept verkoopprijs at 1030
           accept winstper at 1135
           compute aankoopprijs=verkoopprijs/(1+winstper/100)
           display aankoopprijs at 1430
           accept toets at 1740
       .

       v-input-3-m-output-3.
           display G-SCHERMB3
           accept artikelnummer at 0830
           accept omschrijving at 0930
           accept aankoopprijs at 1030
           accept verkoopprijs at 1130
           compute winstper=(verkoopprijs -
           aankoopprijs)*100/aankoopprijs
           display winstper at 1430
           accept toets at 1740

       .



