°æ°í
  ¹Ú¿ì¹üÀÇ Çã¶ô ¾øÀÌ´Â »ó¾÷Àû »ç¿ëÀ» ±ÝÇÕ´Ï´Ù.


 
[Example 5]
 È­¸é¿¡ Ãâ·ÂÇÏ´Â ±¸±¸´Ü ÇÁ·Î±×·¥ÀÔ´Ï´Ù.
 
 
*
IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE5.
*
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. SAMSUNG.
OBJECT-COMPUTER. SAMSUNG.
*
DATA DIVISION.
WORKING-STORAGE SECTION.
*
77 I PIC 9.
77 J PIC 9.
77 K PIC 99.
77 K1 PIC 99.
77 K2 PIC 99.
77 K3 PIC 99.
*
PROCEDURE DIVISION.
START-RTN.
DISPLAY " "   ERASE.
MOVE 3 TO K2.
PERFORM A-RTN 9  TIMES.
STOP "ENTER KEY !!!".
STOP RUN.
A-RTN.
MOVE 7 TO K1.
ADD 1 TO I.
MOVE 0 TO J.
PERFORM B-RTN 9  TIMES.
ADD 8 TO K2.
B-RTN.
ADD 1 TO J.
COMPUTE K  =  I  *  J.
ADD 1 TO K1.
DISPLAY I LINE  K1  POSITION  K2.
COMPUTE K3  =  K2  +  1.
DISPLAY "*" LINE  K1  POSITION  K3.
COMPUTE K3  =  K3  +  1.
DISPLAY J LINE  K1  POSITION  K3.
COMPUTE K3  =  K3  +  1.
DISPLAY "=" LINE  K1  POSITION  K3.
COMPUTE K3  =  K3  +  1.
DISPLAY K LINE  K1  POSITION  K3.
 
 
ÁöÀû ¼ÒÀ¯±ÇÀ» º¸È£ÇսôÙ.
 
¢Ð ¢½ ¢Ñ