uses wincrt;
var
mkb,mkb1,mkb2,mkb3,mnb,mnb1,mnb2,mnb3:string;
harga,harga1,harga2,harga3,hargax,jumlah,jumlah1,jumlah2,jumlah3,jumlahx :longint;
subtotal,discount,total:real;
hi,hi1,hi2,hi3:integer;
begin
write('masukkan Kode barang = ');
readln(mkb);
write('masukkan Nama Barang = ');
readln(mnb);
write('masukkan harga barang = ');
readln(harga);
write('masukkan jumlah = ');
readln(jumlah);
hi:=jumlah*harga;
writeln('harga item = ',hi);
write('masukkan Kode barang = ');
readln(mkb1);
write('masukkan Nama Barang = ');
readln(mnb1);
write('masukkan harga barang = ');
readln(harga1);
write('masukkan jumlah = ');
readln(jumlah1);
hi1:=jumlah1*harga1;
writeln('harga item = ',hi1);
write('masukkan Kode barang = ');
readln(mkb2);
write('masukkan Nama Barang = ');
readln(mnb2);
write('masukkan harga barang = ');
readln(harga2);
write('masukkan jumlah = ');
readln(jumlah2);
hi2:=jumlah2*harga2;
writeln('harga item = ',hi2);
write('masukkan Kode barang = ');
readln(mkb3);
write('masukkan Nama Barang = ');
readln(mnb3);
write('masukkan harga barang = ');
readln(harga3);
write('masukkan jumlah = ');
readln(jumlah3);
hi3:=jumlah3*harga3;
writeln('harga item = ',hi3);
subtotal:=(hi+hi1+hi2+hi3);
writeln('`````````````````````````````````````');
write('Barcode');
writeln(':',mkb);
write('Nama Barang');
writeln(':',mnb);
write('Harga Satuan');
writeln(':',harga);
write('Jumlah Barang');
writeln(':',jumlah);
write('Barcode');
writeln(':',mkb1);
write('Nama Barang');
writeln(':',mnb1);
write('Harga Satuan');
writeln(':',harga1);
write('Jumlah Barang');
writeln(':',jumlah1);
write('Barcode');
writeln(':',mkb2);
write('Nama Barang');
writeln(':',mnb2);
write('Harga Satuan');
writeln(':',harga2);
write('Jumlah Barang');
writeln(':',jumlah2);
write('Barcode');
writeln(':',mkb3);
write('Nama Barang');
writeln(':',mnb3);
write('Harga Satuan');
writeln(':',harga3);
write('Jumlah Barang');
writeln(':',jumlah3);
writeln(' __________________________________ ');
writeln(' Joan Joan Joan Joan Joan Joan Joan ');
writeln(' ---------------------------------- ');
writeln('subtotal : ',subtotal:2:0);
if(jumlah or jumlah1 or jumlah2 or jumlah3 <2 ) then
discount:=0*subtotal
else if(jumlah 0r >2 ) then
discount:=0.02*subtotal
else
discount :=0.02*subtotal;
writeln('discount : ',discount:2:2);
total :=(subtotal-discount);
writeln('total = ',total:2:2);
readln;
end.
Tidak ada komentar:
Posting Komentar