Coding ARRAY Pada Program COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. ARRAY.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 AWAL.
02 NAMA PIC X(10) OCCURS 100 TIMES.
77 I PIC 9(2).
77 N PIC 9(2).
PROCEDURE DIVISION.
MULAI.
DISPLAY 'INPUT JUMLAH NAMA :'.
ACCEPT N.
PERFORM HASIL VARYING I FROM 1 BY 1 UNTIL I=N.
HASIL.
DISPLAY 'NAMA KE-', I , '?'.
ACCEPT NAMA(I).
ULANG.
DISPLAY SPACE.
PERFORM TAMPIL VARYING I FROM 1 BY 1 UNTIL I=N.
TAMPIL.
DISPLAY NAMA(I).
AKHIR.
STOP RUN.
CONTOH OUT PUT NYA :
Minggu, 10 November 2013
Coding ARRAY Pada COBOL
11.30
No comments
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar