Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM A SUBTRACT OPERATION

Posted By: Scarlett Hughes     Category: Cobol     Views: 1948

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

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

       IDENTIFICATION DIVISION.
      
       PROGRAM-ID. PROG408.
      
       ENVIRONMENT DIVISION.
      
       CONFIGURATION SECTION.
      
       SPECIAL-NAMES.
      
           PRINTER IS PRINTER-DISPLAY.
      
       DATA DIVISION.
      
       01  W005-SUBTRAHEND                 PIC 9   VALUE 2.  
      
       01  W005-MINUEND                    PIC 99  VALUE 12.
      
       PROCEDURE DIVISION.
      
       PRINT-COMPUTED-VALUE.
           SUBTRACT W005-SUBTRAHEND FROM  W005-MINUEND.
           DISPLAY "PROGRAM PROG408: THE RESULT OF 12 - 2 IS:"
                                       UPON PRINTER-DISPLAY.
           DISPLAY W005-MINUEND UPON PRINTER-DISPLAY.
           STOP RUN.

  
Share: 



Scarlett Hughes
Scarlett Hughes author of PROGRAM DISPLAYS ON THE PRINTER A VALUE COMPUTED FROM A SUBTRACT OPERATION is from London, United Kingdom.
 
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!