# Nama File : Quis

||

Simpan di C:\Quis\NIM

Tampilan Output:

Ketentuan:
Kode
jenis

Jenis

A || a

Cerita Anak

B || b

C || c

Kode buku

Buku

harga

1

Comic

9000

2

Dongeng

4000

1

Cinta

25000

2

Misteri

20000

1

C++

25000

2

Delphi

30000

Novel

Komputer

Ketentuan Soal :
- Masukkan Kode Jenis dan Kode Buku
- Jenis, Buku dan Harga Tampil
- Masukkan Jumlah Beli,
- Jumlah Bayar = Harga*jumlah
- PPN = 10 % * Jumlah Bayar
- Total = jumlah bayar - ppn
- Masukkan Bayar, Tampil Uang Kembali
- Uang Kembali = Uang Bayar – Total

Listing Program
#include<stdio>
#include<conio>
#include<iostream>
main()
{
char kd,*jns,*buku,kdbk;
int hrg,jumbel,jb,totbyr,ppn,bayar,kembali;
clrscr();
cout<<"
TOKO BUKU 'PANDAI'"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"PILIHAN :"<<endl;
cout<<"A. CERITA ANAK"<<endl;
cout<<"
1.COMIC
: 9000"<<endl;
cout<<"
2.DONGENG : 4000"<<endl;
cout<<endl;
cout<<"B. NOVEL"<<endl;
cout<<"
1.CINTA
: 25000"<<endl;
cout<<"
2.MISTERI : 20000"<<endl;
cout<<endl;
cout<<"C. KOMPUTER"<<endl;
cout<<"
1.C++
: 25000"<<endl;
cout<<"
2.DELPHI : 30000"<<endl;
cout<<endl;
cout<<"------------------------------------------endl;
cout<<"Masukan Kode Buku [A/B/C]:";cin>>kd;
cout<<"Masukan Jenis Buku [1/2] :";cin>>jns;
switch (kd)
{
case 'A' : case 'a':
jns="CERITA ANAK";
if (kdbk=='1')
{
buku="COMIC";
hrg=9000;
}
else
{ buku="DONGENG";
hrg=4000;}
break;
case 'B' : case 'b':
jns="NOVEL";
if (kdbk=='1')
{
buku="CINTA";
hrg=25000;

}
else
{ buku="MISTERI";
hrg=20000;}
break;
case 'C' : case 'c':
jns="KOMPUTER";
if (kdbk=='1')
{
buku="C++";
hrg=25000;
}
else
{ buku="DELPHI";
hrg=30000;}
break;
}
cout<<"JENIS
:"<<jns<<endl;
cout<<"BUKU
:"<<buku<<endl;
cout<<"HARGA
:"<<hrg<<endl;
cout<<"-------------------------------------"<<endl;
cout<<"MASUKAN JUMLAH BELI
:";cin>>jumbel;
jb=hrg*jumbel;
cout<<"JUMLAH BAYAR
:"<<jb<<endl;
ppn=0.1*jb;
cout<<"PPN 10%
:"<<ppn<<endl;
totbyr=jb-ppn;
cout<<"TOTAL BAYAR
:"<<totbyr<<endl;
cout<<endl;
cout<<"UANG BAYAR
:";cin>>bayar;
kembali=bayar-totbyr;
cout<<"UANG KEMBALI
:"<<kembali<<endl;
cout<<"------------------------------------"<<endl;
cout<<"
THANK'Zxzzzz
"<<endl;
getch();
}