|
|
|
|
|
|
|
|
|
|
* |
|
|
IDENTIFICATION |
|
DIVISION. |
|
|
PROGRAM-ID. |
|
T6. |
|
* |
|
|
ENVIRONMENT |
|
DIVISION. |
|
|
CONFIGURATION |
|
SECTION. |
|
|
SOURCE-COMPUTER. |
|
SAMSUNG. |
|
|
OBJECT-COMPUTER. |
|
SAMSUNG. |
|
* |
|
|
DATA |
|
DIVISION. |
|
|
WORKING-STORAGE |
|
SECTION. |
|
* |
|
|
77 |
X |
PIC |
9(5) |
VALUE 0. |
|
|
77 |
Y |
PIC |
9(5) |
VALUE 0. |
|
|
77 |
Z |
PIC |
9(5) |
VALUE 0. |
|
|
77 |
L |
PIC |
ZZZZ9. |
|
|
|
|
77 |
M |
PIC |
ZZZZ9. |
|
|
|
|
77 |
N |
PIC |
ZZZZ9. |
|
|
|
* |
|
|
PROCEDURE |
|
DIVISION. |
|
|
START-RTN. |
|
|
|
|
|
|
|
DISPLAY " " ERASE. |
|
|
|
DISPLAY " Enter integer-1 : " |
|
|
|
|
|
LINE 7 POSITION 10
REVERSE. |
|
|
|
ACCEPT X PROMPT LINE
7 POSITION 28. |
|
|
|
IF X = 0 GO TO END-RTN. |
|
|
|
DISPLAY " Enter integer-2 : " |
|
|
|
|
|
LINE 10 POSITION 10
REVERSE. |
|
|
|
ACCEPT Y PROMPT LINE
10 POSITION 28. |
|
|
|
DISPLAY " Enter integer-3 : " |
|
|
|
|
|
LINE 13 POSITION 10
REVERSE. |
|
|
|
ACCEPT Z PROMPT LINE
13 POSITION 28. |
|
|
|
IF X > Y NEXT SENTENCE
ELSE GO TO PROC-1. |
|
|
|
IF X > Z NEXT SENTENCE
ELSE GO TO PROC-2. |
|
|
|
IF |
Y > Z |
|
MOVE X TO L, |
|
|
|
|
|
|
|
|
MOVE Y TO M, |
|
|
|
|
|
|
|
|
MOVE Z TO N, |
|
|
|
|
|
ELSE |
|
|
|
|
|
|
|
|
|
MOVE X TO L, |
|
|
|
|
|
|
|
|
MOVE Z TO M, |
|
|
|
|
|
|
|
|
MOVE Y TO N. |
|
|
|
GO TO PROC-3. |
|
|
PROC-2. |
|
|
|
|
|
|
|
MOVE Z TO L, |
|
|
|
MOVE X TO M, |
|
|
|
MOVE Y TO N. |
|
|
|
GO TO PROC-3. |
|
|
PROC-1. |
|
|
|
|
|
|
|
IF Y > Z
NEXT SENTENCE |
|
|
|
|
|
ELSE |
|
|
|
|
|
|
|
|
|
MOVE Z TO L, |
|
|
|
|
|
|
|
|
MOVE Y TO M, |
|
|
|
|
|
|
|
|
MOVE X TO N, |
|
|
|
|
|
|
|
|
GO TO PROC-3. |
|
|
|
IF |
X > Z |
|
MOVE Y TO L, |
|
|
|
|
|
|
|
|
MOVE X TO M, |
|
|
|
|
|
|
|
|
MOVE Z TO N, |
|
|
|
|
|
ELSE |
|
|
|
|
|
|
|
|
|
MOVE Y TO L, |
|
|
|
|
|
|
|
|
MOVE Z TO M, |
|
|
|
|
|
|
|
|
MOVE X TO N. |
|
|
PROC-3. |
|
|
|
|
|
|
|
DISPLAY "HIGH <--> LOW" LINE
18 POSITION 1. |
|
|
|
DISPLAY L M
N. |
|
|
END-RTN. |
|
|
|
|
|
|
|
STOP RUN. |
|
|
|
|
|
|
|
|
|
|
|
|
|