program transaksi_penjualan;
uses wincrt;
var
no_trans_pajar,tgl_pajar,jbeli_pajar,bayar_pajar,hrg_pajar,jbelanja_pajar,kd_brg_pajar:longint;
kembali_pajar,potongan_pajar,tot_belanja:real;
pembelian_pajar,nm_brg_pajar:string;
begin
write('no transaksi :');readln(no_trans_pajar);
write('tanggal :');readln(tgl_pajar);
write('nama pembeli :');readln(pembelian_pajar);
write('kode barang :B00');readln(kd_brg_pajar);
case kd_brg_pajar of
1:nm_brg_pajar:='pepsodent family';
2:nm_brg_pajar:='lifeboy';
3:nm_brg_pajar:='biore facial form';
4:nm_brg_pajar:='formula sikat gigi';
5:nm_brg_pajar:='handuk';
end;
writeln('nama barang : ',nm_brg_pajar);
if kd_brg_pajar=1 then hrg_pajar:=7000
else if kd_brg_pajar=2 then hrg_pajar:=2500
else if kd_brg_pajar=3 then hrg_pajar:=6000
else if kd_brg_pajar=4 then hrg_pajar:=7000
else if kd_brg_pajar=5 then hrg_pajar:=35000;
write('harga :',hrg_pajar);writeln;
write('jumlah beli :');readln(jbeli_pajar);
writeln;
jbelanja_pajar:=jbeli_pajar*hrg_pajar;
write('jumlah belanja :',jbelanja_pajar);writeln;
if jbelanja_pajar >=200000 then potongan_pajar:=0.1*jbelanja_pajar;
write('potongan :',potongan_pajar);writeln;
tot_belanja:=jbelanja_pajar-potongan_pajar;
write('total belanja :',tot_belanja);
writeln;
writeln;
write('uang pembayaran :');readln(bayar_pajar);
kembali_pajar:=bayar_pajar-tot_belanja;
write('kembalian :',kembali_pajar);
end.
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar