-
-
Save vcsjones/87b703ed71eaa3a054665c4c2c571fb5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. HelloWorld. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 TEXT-INPUT PIC X(20). | |
01 SAY-TIMES USAGE BINARY-LONG VALUE 0. | |
01 ITER USAGE BINARY-LONG VALUE 0. | |
PROCEDURE DIVISION. | |
Main. | |
DISPLAY "Gimme a name!". | |
ACCEPT TEXT-INPUT. | |
DISPLAY "How many times should I say hello?". | |
ACCEPT SAY-TIMES. | |
PERFORM Say WITH TEST BEFORE UNTIL ITER=SAY-TIMES. | |
STOP RUN. | |
Say. | |
DISPLAY ITER, " Hi, ", TEXT-INPUT | |
ADD 1 TO ITER. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment