program
swalayan_dengan_ketentuan_jika_total_belanja_diatas_100000_maka_dapat_discount_10persen;
uses wincrt;
var
mkb,mnb:string;
subtotal,discount,total,harga,jumlah:real;
begin
clrscr;
write('masukkan
Kode barang = ');
readln(mkb);
write('masukkan
Nama Barang = ');
readln(mnb);
write('masukkan
harga barang = ');
readln(harga);
write('masukkan
jumlah = ');
readln(jumlah);
clrscr;
subtotal:=(harga*jumlah);
GotoXY(14,1);writeln('AGUSTIAWAN
[IT-5]');
gotoXY(14,5);writeln('JOEAN-SWALAYAN');
gotoXY(11,6);writeln('YOUR
RECEIP TANK YOU');
gotoXY(3,7);writeln('************************************');
gotoXY(3,8);writeln('Barcode');
gotoXY(20,9);writeln(':',mkb);
gotoXY(3,10);writeln('Nama
Barang');
gotoXY(20,11);writeln(':',mnb);
gotoXY(3,12);writeln('Harga
Satuan');
gotoXY(20,13);writeln(':Rp
',harga:0:0);
gotoXY(3,14);writeln('Jumlah
Barang');
gotoXY(20,15);writeln(':',jumlah:0:0);
gotoXY(3,16);writeln('
__________________________________ ');
gotoXY(3,17);writeln('|//////////////////////////////////|');
gotoXY(3,18);writeln('
---------------------------------- ');
gotoXY(3,19);writeln('Subtotal Rp ',subtotal:2:2);
if(subtotal<100000)
then
discount:=0*subtotal
else
if(subtotal>100000) then
discount:=0.1*subtotal
else
discount
:=0.1*subtotal;
gotoXY(3,20);writeln('Discount Rp ',
discount:2:2);
total
:=(subtotal-discount);
gotoXY(3,21);writeln('|==================================|');
gotoXY(3,22);writeln('GREEND
TOTAL Rp ',total:2:2);
gotoXY(3,24);writeln('**********PLEES
CALL AGAIN**********');
readln;
end.
Tidak ada komentar:
Posting Komentar