       identification division.
       program-id. Deel-3-Opgave-10.
       author. Keppens Toon.

       environment division.
       configuration section.
       source-computer. PC.
       object-computer. PC.

       data division.
       working-storage section.
       01 scherm-1.
           03 lijn-dubbel pic x(35)
               value ":::::::::::::::::::::::::::::::::::".
           03 lijn-info-top pic x(60)
               value "Hogeschool Gent  --   Departement BEST".
           03 lijn-info-bottom pic x(12) value "Keppens Toon".
           03 lijn-info-midden-0 pic x(63)
               value "----------------------- Berekeningen -------------
      -        "------------".
           03 lijn-info-midden-1 pic x(63)
               value "------------------- Berekenen Verkoopprijs -------
      -        "------------".
           03 lijn-info-midden-2 pic x(63)
               value "------------------- Berekenen Aankoopprijs -------
      -        "------------".
           03 lijn-info-midden-3 pic x(63)
               value "----------------- Berekenen Winstpercentage ------
      -        "------------".
           03 lijn-dubbelpunt pic x(1) value ":".

       01 datum pic 99/99/99.

       01 input-data.
           03 artikelnummer pic 9(6).
           03 aankoopprijs pic 9(4).
           03 winstpercentage pic 99.
           03 omschrijving pic x(25).
           03 keuze pic 9.
           03 toets pic x.

       01 verkoopprijs pic 9(4)V99   VALUE ZERO.
       01 E-verkoopprijs pic 9(4).99.
       01 winstpercentage2 pic 9V99  VALUE ZERO.
       01 reken-getal pic 9(5).

       procedure division.
       main.

           perform menu with test after until keuze = 0

       stop run.

       menu.

      *    ########### OPBOUWEN VAN HET SCHERM ############
           accept datum from date
           display spaces upon crt
           display lijn-dubbel at 0206 with foreground-color is 2
           display lijn-dubbel at 0241 with foreground-color is 2
           display lijn-info-top at 0308 with foreground-color is 3
           display datum at 0366 with foreground-color is 3
           display lijn-dubbelpunt at 0306 with foreground-color is 2
           display lijn-dubbelpunt at 0375 with foreground-color is 2
           display lijn-dubbel at 0406 with foreground-color is 2
           display lijn-dubbel at 0441 with foreground-color is 2
           display lijn-dubbelpunt at 0506 with foreground-color is 2
           display lijn-dubbelpunt at 0575 with foreground-color is 2
           display lijn-dubbelpunt at 0606 with foreground-color is 2
           display lijn-dubbelpunt at 0675 with foreground-color is 2
           display lijn-dubbelpunt at 0706 with foreground-color is 2
           display lijn-dubbelpunt at 0775 with foreground-color is 2
           display lijn-dubbelpunt at 0806 with foreground-color is 2
           display lijn-dubbelpunt at 0875 with foreground-color is 2
           display lijn-dubbelpunt at 0906 with foreground-color is 2
           display lijn-dubbelpunt at 0975 with foreground-color is 2
           display lijn-dubbelpunt at 1006 with foreground-color is 2
           display lijn-dubbelpunt at 1075 with foreground-color is 2
           display lijn-dubbelpunt at 1106 with foreground-color is 2
           display lijn-dubbelpunt at 1175 with foreground-color is 2
           display lijn-dubbelpunt at 1206 with foreground-color is 2
           display lijn-dubbelpunt at 1275 with foreground-color is 2
           display lijn-dubbelpunt at 1306 with foreground-color is 2
           display lijn-dubbelpunt at 1375 with foreground-color is 2
           display lijn-dubbelpunt at 1406 with foreground-color is 2
           display lijn-dubbelpunt at 1475 with foreground-color is 2
           display lijn-dubbelpunt at 1506 with foreground-color is 2
           display lijn-dubbelpunt at 1575 with foreground-color is 2
           display lijn-dubbelpunt at 1606 with foreground-color is 2
           display lijn-dubbelpunt at 1675 with foreground-color is 2
           display lijn-dubbelpunt at 1706 with foreground-color is 2
           display lijn-dubbelpunt at 1775 with foreground-color is 2
           display lijn-dubbelpunt at 1806 with foreground-color is 2
           display lijn-dubbelpunt at 1875 with foreground-color is 2
           display lijn-dubbelpunt at 1906 with foreground-color is 2
           display lijn-dubbelpunt at 1975 with foreground-color is 2
           display lijn-dubbelpunt at 2006 with foreground-color is 2
           display lijn-dubbelpunt at 2075 with foreground-color is 2
           display lijn-dubbel at 2106 with foreground-color is 2
           display lijn-dubbel at 2141 with foreground-color is 2
           display lijn-info-bottom at 2234 with foreground-color is 3
           display lijn-dubbelpunt at 2206 with foreground-color is 2
           display lijn-dubbelpunt at 2275 with foreground-color is 2
           display lijn-dubbel at 2306 with foreground-color is 2
           display lijn-dubbel at 2341 with foreground-color is 2

           display lijn-info-midden-0 at 0610

           display "1. Verkoopprijs" at 0930 with foreground-color is 8
           display "2. Aankoopprijs" at 1130 with foreground-color is 8
           display "3. Winstpercentage"
               at 1330 with foreground-color is 8
           display "0. EINDE " at 1530 with foreground-color is 8
           display "Keuze: " at 1830 with foreground-color is 8

           initialize input-data

           accept keuze at 1848 with foreground-color is 7

           if keuze = 1 then
               perform prog-verkoopprijs
           end-if

           if keuze = 2 then
               perform prog-aankoopprijs
           end-if

           if keuze = 3 then
               perform prog-winstpercentage
           end-if
       .

       prog-verkoopprijs.
      *    ########### OPBOUWEN VAN HET SCHERM ############
           accept datum from date
           display spaces upon crt
           display lijn-dubbel at 0206 with foreground-color is 2
           display lijn-dubbel at 0241 with foreground-color is 2
           display lijn-info-top at 0308 with foreground-color is 3
           display datum at 0366 with foreground-color is 3
           display lijn-dubbelpunt at 0306 with foreground-color is 2
           display lijn-dubbelpunt at 0375 with foreground-color is 2
           display lijn-dubbel at 0406 with foreground-color is 2
           display lijn-dubbel at 0441 with foreground-color is 2
           display lijn-dubbelpunt at 0506 with foreground-color is 2
           display lijn-dubbelpunt at 0575 with foreground-color is 2
           display lijn-dubbelpunt at 0606 with foreground-color is 2
           display lijn-dubbelpunt at 0675 with foreground-color is 2
           display lijn-dubbelpunt at 0706 with foreground-color is 2
           display lijn-dubbelpunt at 0775 with foreground-color is 2
           display lijn-dubbelpunt at 0806 with foreground-color is 2
           display lijn-dubbelpunt at 0875 with foreground-color is 2
           display lijn-dubbelpunt at 0906 with foreground-color is 2
           display lijn-dubbelpunt at 0975 with foreground-color is 2
           display lijn-dubbelpunt at 1006 with foreground-color is 2
           display lijn-dubbelpunt at 1075 with foreground-color is 2
           display lijn-dubbelpunt at 1106 with foreground-color is 2
           display lijn-dubbelpunt at 1175 with foreground-color is 2
           display lijn-dubbelpunt at 1206 with foreground-color is 2
           display lijn-dubbelpunt at 1275 with foreground-color is 2
           display lijn-dubbelpunt at 1306 with foreground-color is 2
           display lijn-dubbelpunt at 1375 with foreground-color is 2
           display lijn-dubbelpunt at 1406 with foreground-color is 2
           display lijn-dubbelpunt at 1475 with foreground-color is 2
           display lijn-dubbelpunt at 1506 with foreground-color is 2
           display lijn-dubbelpunt at 1575 with foreground-color is 2
           display lijn-dubbelpunt at 1606 with foreground-color is 2
           display lijn-dubbelpunt at 1675 with foreground-color is 2
           display lijn-dubbelpunt at 1706 with foreground-color is 2
           display lijn-dubbelpunt at 1775 with foreground-color is 2
           display lijn-dubbelpunt at 1806 with foreground-color is 2
           display lijn-dubbelpunt at 1875 with foreground-color is 2
           display lijn-dubbelpunt at 1906 with foreground-color is 2
           display lijn-dubbelpunt at 1975 with foreground-color is 2
           display lijn-dubbelpunt at 2006 with foreground-color is 2
           display lijn-dubbelpunt at 2075 with foreground-color is 2
           display lijn-dubbel at 2106 with foreground-color is 2
           display lijn-dubbel at 2141 with foreground-color is 2
           display lijn-info-bottom at 2234 with foreground-color is 3
           display lijn-dubbelpunt at 2206 with foreground-color is 2
           display lijn-dubbelpunt at 2275 with foreground-color is 2
           display lijn-dubbel at 2306 with foreground-color is 2
           display lijn-dubbel at 2341 with foreground-color is 2

           display lijn-info-midden-1 at 0610

           display "Artikelnummer: " at 0930 with foreground-color is 8
           display "Omschrijving: " at 1130 with foreground-color is 8
           display "Aankoopprijs: " at 1330 with foreground-color is 8
           display "Winstpercentage: " at 1530
               with foreground-color is 8
           display "Verkoopprijs: " at 1830 with foreground-color is 8

           accept artikelnummer at 0948 with foreground-color is 7
           accept omschrijving at 1148 with foreground-color is 7
           accept aankoopprijs at 1348 with foreground-color is 7
           accept winstpercentage at 1548 with foreground-color is 7


           compute verkoopprijs = aankoopprijs *
               (1 + winstpercentage / 100)

           display verkoopprijs at 1848 with foreground-color is 7
           display "Druk op een toets..." at 1930
               with foreground-color is 8

           accept toets at 1950 with foreground-color is 8

       .

       prog-aankoopprijs.
      *    ########### OPBOUWEN VAN HET SCHERM ############
           accept datum from date
           display spaces upon crt
           display lijn-dubbel at 0206 with foreground-color is 2
           display lijn-dubbel at 0241 with foreground-color is 2
           display lijn-info-top at 0308 with foreground-color is 3
           display datum at 0366 with foreground-color is 3
           display lijn-dubbelpunt at 0306 with foreground-color is 2
           display lijn-dubbelpunt at 0375 with foreground-color is 2
           display lijn-dubbel at 0406 with foreground-color is 2
           display lijn-dubbel at 0441 with foreground-color is 2
           display lijn-dubbelpunt at 0506 with foreground-color is 2
           display lijn-dubbelpunt at 0575 with foreground-color is 2
           display lijn-dubbelpunt at 0606 with foreground-color is 2
           display lijn-dubbelpunt at 0675 with foreground-color is 2
           display lijn-dubbelpunt at 0706 with foreground-color is 2
           display lijn-dubbelpunt at 0775 with foreground-color is 2
           display lijn-dubbelpunt at 0806 with foreground-color is 2
           display lijn-dubbelpunt at 0875 with foreground-color is 2
           display lijn-dubbelpunt at 0906 with foreground-color is 2
           display lijn-dubbelpunt at 0975 with foreground-color is 2
           display lijn-dubbelpunt at 1006 with foreground-color is 2
           display lijn-dubbelpunt at 1075 with foreground-color is 2
           display lijn-dubbelpunt at 1106 with foreground-color is 2
           display lijn-dubbelpunt at 1175 with foreground-color is 2
           display lijn-dubbelpunt at 1206 with foreground-color is 2
           display lijn-dubbelpunt at 1275 with foreground-color is 2
           display lijn-dubbelpunt at 1306 with foreground-color is 2
           display lijn-dubbelpunt at 1375 with foreground-color is 2
           display lijn-dubbelpunt at 1406 with foreground-color is 2
           display lijn-dubbelpunt at 1475 with foreground-color is 2
           display lijn-dubbelpunt at 1506 with foreground-color is 2
           display lijn-dubbelpunt at 1575 with foreground-color is 2
           display lijn-dubbelpunt at 1606 with foreground-color is 2
           display lijn-dubbelpunt at 1675 with foreground-color is 2
           display lijn-dubbelpunt at 1706 with foreground-color is 2
           display lijn-dubbelpunt at 1775 with foreground-color is 2
           display lijn-dubbelpunt at 1806 with foreground-color is 2
           display lijn-dubbelpunt at 1875 with foreground-color is 2
           display lijn-dubbelpunt at 1906 with foreground-color is 2
           display lijn-dubbelpunt at 1975 with foreground-color is 2
           display lijn-dubbelpunt at 2006 with foreground-color is 2
           display lijn-dubbelpunt at 2075 with foreground-color is 2
           display lijn-dubbel at 2106 with foreground-color is 2
           display lijn-dubbel at 2141 with foreground-color is 2
           display lijn-info-bottom at 2234 with foreground-color is 3
           display lijn-dubbelpunt at 2206 with foreground-color is 2
           display lijn-dubbelpunt at 2275 with foreground-color is 2
           display lijn-dubbel at 2306 with foreground-color is 2
           display lijn-dubbel at 2341 with foreground-color is 2

           display lijn-info-midden-2 at 0610

           display "Artikelnummer: " at 0930 with foreground-color is 8
           display "Omschrijving: " at 1130 with foreground-color is 8
           display "Verkoopprijs: " at 1330 with foreground-color is 8
           display "Winstpercentage: " at 1530
               with foreground-color is 8
           display "Aankoopprijs: " at 1830 with foreground-color is 8

           accept artikelnummer at 0948 with foreground-color is 7
           accept omschrijving at 1148 with foreground-color is 7
           accept E-verkoopprijs at 1348 with foreground-color is 7
           accept winstpercentage at 1548 with foreground-color is 7

           move E-verkoopprijs to verkoopprijs

           divide 100 into winstpercentage giving winstpercentage2
           add 1 to winstpercentage2
           divide winstpercentage2 into verkoopprijs giving aankoopprijs

           display aankoopprijs at 1848 with foreground-color is 7
           display "Druk op een toets..." at 1930
               with foreground-color is 8

           accept toets at 1950 with foreground-color is 8
       .

       prog-winstpercentage.
      *    ########### OPBOUWEN VAN HET SCHERM ############
           accept datum from date
           display spaces upon crt
           display lijn-dubbel at 0206 with foreground-color is 2
           display lijn-dubbel at 0241 with foreground-color is 2
           display lijn-info-top at 0308 with foreground-color is 3
           display datum at 0366 with foreground-color is 3
           display lijn-dubbelpunt at 0306 with foreground-color is 2
           display lijn-dubbelpunt at 0375 with foreground-color is 2
           display lijn-dubbel at 0406 with foreground-color is 2
           display lijn-dubbel at 0441 with foreground-color is 2
           display lijn-dubbelpunt at 0506 with foreground-color is 2
           display lijn-dubbelpunt at 0575 with foreground-color is 2
           display lijn-dubbelpunt at 0606 with foreground-color is 2
           display lijn-dubbelpunt at 0675 with foreground-color is 2
           display lijn-dubbelpunt at 0706 with foreground-color is 2
           display lijn-dubbelpunt at 0775 with foreground-color is 2
           display lijn-dubbelpunt at 0806 with foreground-color is 2
           display lijn-dubbelpunt at 0875 with foreground-color is 2
           display lijn-dubbelpunt at 0906 with foreground-color is 2
           display lijn-dubbelpunt at 0975 with foreground-color is 2
           display lijn-dubbelpunt at 1006 with foreground-color is 2
           display lijn-dubbelpunt at 1075 with foreground-color is 2
           display lijn-dubbelpunt at 1106 with foreground-color is 2
           display lijn-dubbelpunt at 1175 with foreground-color is 2
           display lijn-dubbelpunt at 1206 with foreground-color is 2
           display lijn-dubbelpunt at 1275 with foreground-color is 2
           display lijn-dubbelpunt at 1306 with foreground-color is 2
           display lijn-dubbelpunt at 1375 with foreground-color is 2
           display lijn-dubbelpunt at 1406 with foreground-color is 2
           display lijn-dubbelpunt at 1475 with foreground-color is 2
           display lijn-dubbelpunt at 1506 with foreground-color is 2
           display lijn-dubbelpunt at 1575 with foreground-color is 2
           display lijn-dubbelpunt at 1606 with foreground-color is 2
           display lijn-dubbelpunt at 1675 with foreground-color is 2
           display lijn-dubbelpunt at 1706 with foreground-color is 2
           display lijn-dubbelpunt at 1775 with foreground-color is 2
           display lijn-dubbelpunt at 1806 with foreground-color is 2
           display lijn-dubbelpunt at 1875 with foreground-color is 2
           display lijn-dubbelpunt at 1906 with foreground-color is 2
           display lijn-dubbelpunt at 1975 with foreground-color is 2
           display lijn-dubbelpunt at 2006 with foreground-color is 2
           display lijn-dubbelpunt at 2075 with foreground-color is 2
           display lijn-dubbel at 2106 with foreground-color is 2
           display lijn-dubbel at 2141 with foreground-color is 2
           display lijn-info-bottom at 2234 with foreground-color is 3
           display lijn-dubbelpunt at 2206 with foreground-color is 2
           display lijn-dubbelpunt at 2275 with foreground-color is 2
           display lijn-dubbel at 2306 with foreground-color is 2
           display lijn-dubbel at 2341 with foreground-color is 2

           display lijn-info-midden-3 at 0610

           display "Artikelnummer: " at 0930 with foreground-color is 8
           display "Omschrijving: " at 1130 with foreground-color is 8
           display "Aankoopprijs: " at 1330 with foreground-color is 8
           display "Verkoopprijs: " at 1530 with foreground-color is 8
           display "Winstpercentage: " at 1830
               with foreground-color is 8
           display "Druk op een toets..." at 1930
               with foreground-color is 8

           accept artikelnummer at 0948 with foreground-color is 7
           accept omschrijving at 1148 with foreground-color is 7
           accept aankoopprijs at 1348 with foreground-color is 7
           accept verkoopprijs at 1548 with foreground-color is 7

           subtract aankoopprijs from verkoopprijs giving reken-getal
           multiply 100 by reken-getal
           divide aankoopprijs into reken-getal giving winstpercentage


           display winstpercentage at 1848 with foreground-color is 7
           display "Druk op een toets..." at 1930
               with foreground-color is 8

           accept toets at 1950 with foreground-color is 8


       .

