IDENTIFICATION
DIVISION.
PROGRAM-ID. ROUND..
AUTHOR. KK.
DATE-WRITTEN. 11-11-1111.
SECURITY.
DATA DIVISION.
WORKING-STORAGE
SECTION.
01 NUM1
PIC 9(3)v9(2) value 3.23.
01 NUM2
PIC 9(3)v9(2) value 4.32.
01 NUM3
PIC 9(3)v9(1).
PROCEDURE
DIVISION.
0000-MAIN
SECTION.
1000-ACCEPT-PARA.
ACCEPT
NUM1.
ACCEPT
NUM2.
ACCEPT
NUM3.
COMPUTE NUM3 ROUNDED = NUM1 + NUM2.
DISPLAY
"NUMBER 1 IS " NUM1.
DISPLAY
"NUMBER 2 IS " NUM2.
DISPLAY
"NUMBER 3 IS " NUM3.
2000-EXIT-PARA.
STOP RUN.
STOP RUN.
No comments:
Post a Comment