Sabtu, 05 Januari 2013

CONTOH PROGRAM COBOL


 IDENTIFICATION DIVISION.
        PRGRAM-ID. latihan.
        AUTHOR. padsha dirgantara.
INSTALLATION. GUNADARMA.
DATE-WRITEN. 02-12-2012.
DATE-COMPILED. 02-12-2012.
SECURITY. OPEN.

ENVIRONMENT.
configuration section.
SOURCE-COMPUTER.
OBJECT-COMPUTER.
SPECIAL-NAMES.
PRINTER IS ALAT-CETAK.
CURRENCY SIGN IS "F".
DECIMAL-POINT IS COMMA.

DATA DIVISION.
working-strorage section.
01 masukan.
02 NAMA pic x(20).
02 NPM pic x(8).
02 KELAS pic x(5).
02 nilai PIC 99,99.

PROCEDURE DIVISION.
mulai.
DISPLAY cls.
display 'nama anda :', accept nama.
display 'npm anda :', accept npm.
display 'kelas anda :', accept kelas.
display 'nilai anda :', accept nilai.
display 'nama :', nama.
display 'npm :', npm.
display 'kelas :', kelas.
display 'nilai :', nilai.
selesai.

Tidak ada komentar:

Posting Komentar