Bomber Graf!TY Indonesia

Jangan cuma kanvas yang di gambar tembok juga

Membuat tabel pada pascal

Membuat tabel dengan RECORD

PROGRAM COBA;

TYPE

BARANG = RECORD

JENIS : STRING[10];

BERAT : REAL;

BIAYA : REAL;

END;

VAR

BRG : ARRAY [1..10] OF BARANG;

N,I : INTEGER;

BEGIN

WRITE(‘JUMLAH DATA : ‘); READLN(N);

FOR I := 1 TO N DO

BEGIN

WRITELN(‘DATA KE : ‘,I);

WITH BRG[I] DO

BEGIN

WRITE(‘JENIS PENGIRIMAN : ‘);READLN(JENIS);

WRITE(‘BERAT : ‘);READLN(BERAT);

END;

FOR I := 1 TO N DO

BEGIN

WITH BRG[I] DO

BEGIN

IF JENIS = ‘PAKET’ THEN BIAYA := 750 * BERAT

ELSE BIAYA := 500 * BERAT

END;

WRITELN(‘PT NYOBA DONG’);

WRITELN(‘———————————————————‘);

WRITELN(‘NO JENIS PENGIRIMAN BERAT BIAYA’);

WRITELN(‘———————————————————‘);

FOR I := 1 TO N DO

WITH BRG[I] DO

WRITELN(I,’ ‘,JENIS,’ ‘,BERAT:4:0,’ ‘,BIAYA:7:0);

READLN;

END;

END;

END.

25 Mei 2010 - Posted by | Uncategorized

Belum ada komentar.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: