LAB1A - LINE 4 COL 5. ACCEPT FIRST-NUM WITH PROMPT LINE 4...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
IDENTIFICATION DIVISION. PROGRAM-ID. LABA1. AUTHOR. L TRAVIS KEETON. DATA DIVISION. WORKING-STORAGE SECTION. 01 MISC. 05 FIRST-NUM PIC 9(4). 05 SECOND-NUM PIC 9(4). 05 TOTAL PIC 9(5). 05 CONTIN PIC X VALUE SPACES. PROCEDURE DIVISION. 000-MAIN. PERFORM 100-INITIAL. PERFORM 200-PROCESS UNTIL CONTIN = "Q" OR "q". PERFORM 900-TERMINATE. STOP RUN. 100-INITIAL. DISPLAY ERASE. DISPLAY 'THIS PROGRAM ADDS PAIRS OF NUMBERS' LINE 2 COL 5. 200-PROCESS. DISPLAY ERASE EOS, LINE 3 COL 1. MOVE ZEROS TO FIRST-NUM, SECOND-NUM. DISPLAY 'PLEASE ENTER THE FIRST NUMBER:'
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LINE 4 COL 5. ACCEPT FIRST-NUM WITH PROMPT LINE 4 COL 40. DISPLAY 'PLEASE ENTER SECOND NUMBER:' LINE 6 COL 5. ACCEPT SECOND-NUM WITH PROMPT LINE 6 COL 40. ADD FIRST-NUM, SECOND-NUM GIVING TOTAL. DISPLAY 'THE SUM IS:' LINE 8 COL 5. DISPLAY TOTAL LINE 8 COL 39. DISPLAY 'ENTER "C" TO [C]ONTINUE, OR "Q" TO [Q]UIT:' LINE 12 COL 5. ACCEPT CONTIN WITH PROMPT LINE 12 COL 48. 900-TERMINATE. DISPLAY '*****************END OF JOB******************' LINE 20 COL 5....
View Full Document

Ask a homework question - tutors are online