Cobol addition of two numbers Program

Cobol Program to add two number

IDENTIFICATION DIVISION.

PROGRAM-ID. ADDPGM.

AUTHOR. INDUS MAINFRAMES.

* SAMPLE COBOL PROGRAM .....

ENVIRONMENT DIVISION.

DATA DIVISION.

WORKING-STORAGE SECTION.

77 A PIC 9(2) VALUE ZEROS.

77 B PIC 9(2) VALUE ZEROS.

77 C PIC 9(3) VALUE ZEROS.

PROCEDURE DIVISION.

MAIN-PARA.

ACCEPT A.

ACCEPT B.

COMPUTE C = A + B.

DISPLAY 'THE VALUE OF C:' C.

STOP RUN.


0 comments:

Post a Comment