COBOL Program to implement
Addition of Two numbers.
PROGRAM:
IDENTIFICATION DIVISION.
PROGRAM-ID ADDITION.
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 A VALUE" .
ACCEPT A.
DISPLAY " ENTER B VALUE ".
ACCEPT B.
ADD A B GIVING C.
DISPLAY " ADDITION IS ",
C.
STOP RUN.
OUTPUT:
No comments:
Post a Comment