Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program to Describe The Functionality of the two dimention table

Posted By: Lacey Hughes     Category: Cobol     Views: 1434

Write a program to Describe The Functionality of the two dimention table.

Code for Program to Describe The Functionality of the two dimention table in Cobol

       IDENTIFICATION DIVISION.
        PROGRAM-ID. PROG.

       DATA DIVISION.
        01 MAT-DET.
         05 ROW1 OCCURS 2 TIMES.
          10 COL1 PIC 99 OCCURS 3 TIMES.
        01 I PIC 9.
        01 J PIC 9.

       PROCEDURE DIVISION.
        PARA1.
         PERFORM VARYING I FROM 1 BY 1 UNTIL I IS GREATER THAN 2
          PERFORM VARYING J FROM 1 BY 1 UNTIL J IS GREATER THAN 3

           DISPLAY "ENTER THE NO(" I ")(" J ")"
           ACCEPT COL1(I,J)

          END-PERFORM
         END-PERFORM.
         
         
      * FOR PRINTING PURPOSE
        
        PERFORM VARYING I FROM 1 BY 1 UNTIL I IS GREATER THAN 2
          PERFORM VARYING J FROM 1 BY 1 UNTIL J IS GREATER THAN 3
            DISPLAY "THE MARKS IS -->"COL1(I,J).

       STOP RUN.


*******
OUTPUT
*******

ENTER THE NO(1)(1)
10
ENTER THE NO(1)(2)
11
ENTER THE NO(1)(3)
13
ENTER THE NO(2)(1)
14
ENTER THE NO(2)(2)
15
ENTER THE NO(2)(3)
16
  
Share: 



Lacey Hughes
Lacey Hughes author of Program to Describe The Functionality of the two dimention 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!