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,discount1,discount2,discount3,total,byr,kbl,discountx:real;
hi,hi1,hi2,hi3:real;
begin
write('masukkan Kode barang = ');
readln(mkb);
write('masukkan Nama Barang = ');
readln(mnb);
write('masukkan harga barang = ');
readln(harga);
write('masukkan jumlah = ');
readln(jumlah);
write('masukkan Kode barang = ');
readln(mkb1);
write('masukkan Nama Barang = ');
readln(mnb1);
write('masukkan harga barang = ');
readln(harga1);
write('masukkan jumlah = ');
readln(jumlah1);
write('masukkan Kode barang = ');
readln(mkb2);
write('masukkan Nama Barang = ');
readln(mnb2);
write('masukkan harga barang = ');
readln(harga2);
write('masukkan jumlah = ');
readln(jumlah2);
write('masukkan Kode barang = ');
readln(mkb3);
write('masukkan Nama Barang = ');
readln(mnb3);
write('masukkan harga barang = ');
readln(harga3);
write('masukkan jumlah = ');
readln(jumlah3);
writeln('`````````````````````````````````````');
writeln('Barcode :',mkb);
writeln('Nama Barang :',mnb);
writeln('Harga Satuan :',harga);
writeln('Jumlah Barang:',jumlah);
hi:=jumlah*harga;
writeln('harga item = ',hi:2:2);
writeln('Barcode :',mkb1);
writeln('Nama Barang :',mnb1);
writeln('Harga Satuan :',harga1);
writeln('Jumlah Barang:',jumlah1);
hi1:=jumlah1*harga1;
writeln('harga item = ',hi1:2:2);
writeln('Barcode :',mkb2);
writeln('Nama Barang :',mnb2);
writeln('Harga Satuan :',harga2);
writeln('Jumlah Barang:',jumlah2);
hi2:=jumlah2*harga2;
writeln('harga item = ',hi2:2:2);
writeln('Barcode :',mkb3);
writeln('Nama Barang :',mnb3);
writeln('Harga Satuan :',harga3);
writeln('Jumlah Barang :',jumlah3);
hi3:=jumlah3*harga3;
writeln('harga item = ',hi3:2:2);
subtotal:=(hi+hi1+hi2+hi3);
writeln(' __________________________________ ');
writeln(' Joan Joan Joan Joan Joan Joan Joan ');
writeln(' ---------------------------------- ');
writeln('subtotal : ',subtotal:2:2);
if(jumlah <2 ) then
discount:=0*hi
else if(jumlah >2 ) then
discount :=0.2*hi
else
discount :=0.2*hi ;
if(jumlah1 <2 ) then
discount1:=0*hi2
else if(jumlah1 >2 ) then
discount1 :=0.2*hi1
else
discount1 :=0.2*hi1 ;
if(jumlah2 <2 ) then
discount2:=0*hi2
else if(jumlah2 >2 ) then
discount2 :=0.2*hi2
else
discount2 :=0.2*hi2 ;
if(jumlah3 <2 ) then
discount3:=0*hi3
else if(jumlah3 >2 ) then
discount3:=0.2*hi3
else
discount3:=0.2*hi3 ;
discountx:=discount + discount1 + discount2 + discount3 ;
writeln('discount : ',discountx:2:2);
total :=(subtotal-discountx);
writeln('total = ',total:2:2);
write('Bayar :'); readln(byr);
kbl:= byr - total;
writeln('Kembali >>>=',kbl:2:2);
writeln('================================');
end.
Tidak ada komentar:
Posting Komentar