Minggu, 07 November 2010

recod 3 dimensi

program recording;
uses crt;
Type
Str25 = String[25];
dftbrg = Record
kode_barang, nama_barang: array [1..20] of string;
qty : array [1..20] of integer;
Price : array [1..20] of Real;
End;
Var
brgRec : dftbrg;
i: byte;
Begin
clrscr;
i:=0;
repeat
i:=i+1;
write('Masukan Kode Barang = ');readln(brgrec.kode_barang[i]);
if brgrec.kode_barang[i]<>'' then
begin
write('Masukan Nama Barang = ');readln(brgrec.nama_barang[i]);
write('Masukan Jumlah Barang = ');readln(brgrec.qty[i]);
write('Masukan Harga Barang = ');readln(brgrec.price[i]);
clrscr;
writeln('Kode Barang = ',brgrec.kode_barang[i]);
writeln('Nama Barang = ',brgrec.nama_barang[i]);
writeln('Jumlah Barang = ',brgrec.qty[i]);
writeln('Harga Barang = ',brgrec.price[i]);
end;
until brgrec.kode_barang[i]='';
Readln;
End.

Tidak ada komentar:

Posting Komentar