Program 1
IDENTIFICATION DIVISION.
PROGRAM-ID. TEST.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 AWAL.
02 NAMA PIC X(10) OCCURS 10 TIMES.
02 KELAS PIC X(10) OCCURS 10 TIMES.
02 NPM PIC X(10) OCCURS 10 TIMES.
77 I PIC 99.
77 N PIC 99.
screen section.
01 cls.
02 blank screen.
PROCEDURE DIVISION.
MULAI.
DISPLAY (, ) 'Input Jumlah Data : ' ACCEPT N.
PERFORM HASIL VARYING I FROM 1 BY 1 UNTIL I=N.
HASIL.
display cls.
DISPLAY (, ) 'Nama Ke ', I , ' = ' ACCEPT NAMA(I).
DISPLAY (, ) 'Kelas ', NAMA(I) , ' = ' ACCEPT KELAS(I).
DISPLAY (, ) 'NPM ', NAMA(I) , ' = ' ACCEPT NPM(I).
ULANG.
DISPLAY CLS.
PERFORM TAMPIL VARYING I FROM 1 BY 1 UNTIL I=N.
TAMPIL.
Display Spaces.
DISPLAY 'Data ke ', I.
DISPLAY 'Nama : ' NAMA(I).
DISPLAY 'Kelas : ' KELAS(I).
DISPLAY 'NPM : ' NPM(I).
selesai.
STOP RUN.
Notepad :
Output :
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar