cobol学习的小作业
IDENTIFICATION DIVISION.
PROGRAM-ID. MULLIST2.
ENVIRONMENT DIVISION.
DATA DIVISION.
77 I PIC 99.
77 J PIC 99.
77 K PIC 999.
77 M PIC ZZ.
77 N PIC ZZ.
77 O PIC ZZ.
PROCEDURE DIVISION.
PERFORM VARYING I FROM 1 BY 1 UNTIL I > 9
PERFORM VARYING J FROM 1 BY 1 UNTIL J > I
COMPUTE K = I * J
MOVE I TO M
MOVE J TO N
MOVE K TO O
DISPLAY N '*' M '=' O ';' WITH NO ADVANCING
END-PERFORM
DISPLAY ' '
END-PERFORM
结果如下: