Contoh Program Gaji Pegawai ( Cobol )

16 12 2009

IDENTIFICATION DIVISION.

Program-id. Level-Number.

AUTHOR. Kelompok-Helmi.

ENVIRONMENT DIVISION.

DATA DIVISION.

Working-storage section.


01 Inputan.

02 nama pic A(10).

02 gaji-pokok pic 9(7).

02 tunjangan pic 9(7).

02 total-gaji pic 9(8).

02 tanya pic A.

88 Lagi value is ‘Y’,’y’.

88 Tidak value is ‘T’,’t’.

Screen Section.

01 hapus-layar.

02 Blank Screen.

01 Datamasuk.

02 Line 3 column 1 ‘>>>PEMASUKKAN NAMA & GAJI<<<’

FOREGROUND-COLOR 10.

02 Line 5 column 1 value ‘NAMA ANDA : ‘

FOREGROUND-COLOR 10.

02 Column plus 2 pic A(10) to nama.

02 Line 6 column 1 value ‘GAJI POKOK :Rp. ‘

FOREGROUND-COLOR 10.

02 Column plus 2 pic 9(7) to gaji-pokok.

02 Line 7 column 1 value ‘BESARNYA TUNJANGAN :Rp. ‘

FOREGROUND-COLOR 10.

02 Column plus 2 pic 9(7) to tunjangan.

PROCEDURE DIVISION.

Mulai.

DISPLAY hapus-layar.

DISPLAY Datamasuk.

ACCEPT Datamasuk.

Compute total-gaji = gaji-pokok + tunjangan.

DISPLAY space.

DISPLAY space.

DISPLAY space.

DISPLAY space.

DISPLAY ‘>>> GAJI ANDA BULAN INI <<<’.

DISPLAY space.

DISPLAY ‘Nama :’, nama.

DISPLAY ‘Gaji Pokok :Rp. ‘, gaji-pokok.

DISPLAY ‘Tunjangan :Rp. ‘, tunjangan.

DISPLAY ‘TOTAL GAJI :Rp. ‘, total-gaji.

DISPLAY ‘Exit (Enter)’, accept tanya.

Selesai.

Stop Run.

OutPut :


About these ads

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: