title: How to print star pattern in COBOL?
body: <p>I tried to print star pattern in cobol. I have constructed the following code. But I think it can be optimized. And also I need to take multiple inputs at run time. Cannot accept inputs at run time. Can anyone guide me?</p>
  
  <pre><code> IDENTIFICATION DIVISION.
   PROGRAM-ID. HELLO.
   DATA DIVISION.
   WORKING-STORAGE SECTION.
   01 WS-TABLE.
    05 WS-A OCCURS 10 TIMES INDEXED BY I.
       10 WS-B PIC X(1).
       10 WS-C PIC X(1) OCCURS 10 TIMES INDEXED BY J.
  01 N PIC 9(1).
  PROCEDURE DIVISION.
  ACCEPT N.
  PERFORM A-PARA VARYING I FROM 1 BY 1 UNTIL I&gt;N.
  PERFORM C-PARA VARYING I FROM 1 BY 1 UNTIL I&gt;N.
  STOP RUN.
  A-PARA.
  PERFORM B-PARA VARYING J FROM 1 BY 1 UNTIL J&gt;I.
  B-PARA.
  MOVE '*' TO WS-C(I,J).
  C-PARA.
  DISPLAY WS-A(I).
  </code></pre>