Saturday, 1 March 2014

COBOL Program to implement Multiplication of Two numbers.



COBOL Program to implement Multiplication of Two numbers.

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

No comments: