Cobol Program to Multiply Two Numbers

 

IDENTIFICATION DIVISION.
PROGRAM-ID. MUL.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 X PIC 9(3).
77 Y PIC 9(3).
77 Z PIC 9(3).
PROCEDURE DIVISION.
PARA.
DISPLAY "ENTER THE VALUE OF X: ".
ACCEPT X.
DISPLAY "ENTER THE VALUE OF Y: ".
ACCEPT Y.
MULTIPLY X BY Y GIVING Z.
DISPLAY "MULTIPLICATION IS: ", Z.
STOP RUN.

Output:
ENTER THE VALUE OF X: 10
ENTER THE VALUE OF Y: 20
MULTIPLICATION IS: 30