IDENTIFICATION DIVISION.
PROGRAM-ID. Two_Sum.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 NUM_1 PIC 9(4).
01 NUM_2 PIC 9(4).
01 RESULT PIC 9(4).
01 RESULT_STR PIC X(4).
PROCEDURE DIVISION.
DISPLAY "First number:".
ACCEPT NUM_1.
DISPLAY "Second number:".
ACCEPT NUM_2.
COMPUTE RESULT=NUM_1+NUM_2.
MOVE RESULT TO RESULT_STR.
STRING RESULT DELIMITED BY SIZE
INTO RESULT_STR.
DISPLAY "Two_Sum:" RESULT_STR.
STOP RUN.
ACCEPT用于接受用户输入的数据,
COMPUTE 用于计算 NUM_1 和 NUM_2 的和,并将结果存储在 RESULT变量中