Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM AN ADD OPERATION

Posted By: Bittan Fischer     Category: Cobol     Views: 1464

WRITE A PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM AN ADD OPERATION.

Code for PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM AN ADD OPERATION in Cobol

       IDENTIFICATION DIVISION.

       PROGRAM-ID. PROG406.
       ENVIRONMENT DIVISION.

       CONFIGURATION SECTION.

       SPECIAL-NAMES.

           PRINTER IS PRINTER-DISPLAY.

       DATA DIVISION.
     
       01  W005-FIRST-OPERAND              PIC 9   VALUE 2.  
     
       01  W005-SECOND-OPERAND             PIC 99  VALUE 12.
     
       PROCEDURE DIVISION.
     
       PRINT-COMPUTED-VALUE.
           ADD W005-FIRST-OPERAND TO W005-SECOND-OPERAND.
           DISPLAY "PROGRAM PROG406: THE SUM OF 2 + 12 IS:"
                                       UPON PRINTER-DISPLAY.
           DISPLAY W005-SECOND-OPERAND UPON PRINTER-DISPLAY.
           STOP RUN.

  
Share: 



Bittan Fischer
Bittan Fischer author of PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM AN ADD OPERATION is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!