daily pastebin goal
10%
SHARE
TWEET

aaa

a guest Aug 9th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  IDENTIFICATION DIVISION.
  2.  PROGRAM-ID. MENU03.
  3.  ENVIRONMENT DIVISION.
  4.  DATA DIVISION.
  5.  WORKING-STORAGE SECTION.
  6.            01 MENU-PICK PIC X VALUE  "N".
  7.                88 PICK-IS-EXIT VALUE "n.
  8.           01 THE-LENGTH2 PIC 9(5).
  9.           01 THE-WIDTH PIC 9(5).
  10.           01 PRICEPURCHASE PIC 9(5).
  11.           01 FINAL-PRICE PIC 9(5).
  12.           01 PRICE PIC 9(5).
  13.       PROCEDURE DIVISION.
  14.       PROGRAM-BEGIN.
  15.           MOVE 1 TO MENU-PICK.
  16.       PERFORM GET-AND-PICK
  17.               UNTIL PICK-IS-EXIT.
  18.  
  19.       PROGRAM-DONE.
  20.       STOP RUN.
  21.  
  22.       GET-AND-DO-PICK.
  23.       PERFORM GET-THE-MENU-PICK.
  24.               PERFORM DO-THE-MENU-PICK.
  25.               DISPLAY"CONTINUE SHOPPING? Y/N".
  26.               ACCEPT MENU-PICK.
  27.               GET-THE-MENU-PICK.
  28.               PERFORM DISPLAY-THE-MENU.
  29.               PERFORM GET-THE-PRICE.
  30.       DO-THE-MENU-PICK.
  31.               IF MENU-PICK = 1
  32.               MOVE 5 TO PRICE
  33.               ELSE IF MENU-PICK = 2
  34.               MOVE 10 TO PRICE
  35.               ELSE IF MENU-PICK = 3
  36.               MOVE 13 TO PRICE
  37.               ELSE IF MENU-PICK = 4
  38.               MOVE 18 TO PRICE
  39.               ELSE
  40.               DISPLAY"INVALID KEYWORD".
  41.  
  42.  
  43.       GO TO GET-THE-MENU-PICK.
  44.               PERFORM KIRA.
  45.       GET-THE-PRICE.
  46.               ACCEPT MENU-PICK.
  47.  
  48.       DISPLAY-THE-MENU.
  49.               DISPLAY "Pricing".
  50.               DISPLAY " ".
  51.                DISPLAY "1. Clear Glass                     RM5.00/square meter ".  
  52.                DISPLAY "2. Frosted Glass                   RM10.00/square meter".
  53.                DISPLAY "3. Sheet Glass                     RM13.00/square meter".
  54.                DISPLAY "4. Patterned Glass                 RM18.00/square meter".
  55.       KIRA.
  56.           DISPLAY "ENTER LENGTH: ".
  57.           ACCEPT THE-LENGTH.
  58.           DISPLAY "ENTER WIDTH: ".
  59.           ACCEPT THE-WIDTH.
  60.           PERFORM FINAL-BILL.
  61.  
  62.       FINAL-BILL.
  63.           COMPUTE PRICEPURCHASE = (THE-LENGTH*THE-WIDTH) * PRICE.
  64.           MOVE PRICE PRICEPURCHASE TO FINALPRICE.
  65.           DISPLAY "TOTAL BILL RM: " FINALPRICE.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top