Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program of multiplication table

Posted By: Rebecca Hughes     Category: Cobol     Views: 9536

Program of multiplication table.

Code for Program of multiplication table in Cobol

       IDENTIFICATION DIVISION.
       PROGRAM-ID.MUL.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       WORKING-STORAGE SECTION.
           77 A PIC 99.
           77 B PIC 99 VALUE 0.
           77 C PIC 99.
       PROCEDURE DIVISION.
           PARA1.
           DISPLAY "ENTER THE NO FOR MULTIPLICATION TABLE=".
           ACCEPT A.
           PERFORM UNTIL B=10
           MULTIPLY A BY B GIVING C
           DISPLAY A "*" B "=" C
           ADD 1 TO B
           END-PERFORM.
           STOP RUN.


OUTPUT 
******************
5 * 1   = 5
5 * 2   = 10
5 * 3   = 15
5 * 4   = 20
5 * 5   = 25
5 * 6   = 30
5 * 7   = 35
5 * 8   = 40
5 * 9   = 45
5 * 10  = 50
  
Share: 


Didn't find what you were looking for? Find more on Program of multiplication table Or get search suggestion and latest updates.

Rebecca Hughes
Rebecca Hughes author of Program of multiplication table is from London, United Kingdom.
 
View All Articles

 
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!