#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main()
{
char nmpem[20],tgl[8],kdcd,kdjudul,*jenis,*judul,*produser;
int harga,jml,ubay,tobay,ukem;
cout<<"nama pembeli : ";cin>>nmpem;
cout<<"tanggal pembelian : ";cin>>tgl;
cout<<"pilih jenis cd[1/2/3] : ";cin>>kdcd;
cout<<"pilih judul cd[a/b/c] : ";cin>>kdjudul;
cout<<"jumlah beli : ";cin>>jml;
if (kdcd=='1')
{
jenis="horor";
if (kdjudul=='a')
{
judul="pocong kesurupan";
produser="golndolberambut";
harga=30000;
}
else if (kdjudul=='b')
{
judul="siksa kubur";
produser="Tatang S";
harga=25000;
}
else
{
judul="mawar hitam";
produser="basah mami";
harga=20000;
}
}
else if (kdcd=='2')
{
jenis="dewasa";
if (kdjudul=='a')
{
judul="Dewasa diri";
produser="Friyadie";
harga=60000;
}
else if (kdjudul=='b')
{
judul="Asmara";
produser="Dg.toa";
harga=30000;
}
else
{
judul="ms.V";
produser="Mr.P";
harga=25000;
}
}
else
{
jenis="legenda";
if (kdjudul=='a')
{
judul="sangkuriang";
produser="Suratmaja";
harga=40000;
}
else if (kdjudul=='b')
{
judul="Malin Kundang";
produser="Andi Offset";
harga=35000;
}
else
{
judul="Jaka Tingkir";
produser="Salma";
harga=10000;
}
}
tobay=jml*harga;
clrscr();
cout<<"***********************************"<<endl;
cout<<"\t\tTOKO CD Bayue"<<endl;
cout<<"***********************************"<<endl;
cout<<"nama pembeli :"<<nmpem<<endl;
cout<<"tanggal pembeli :"<<tgl<<endl;
cout<<"kode jenis Cd :"<<kdcd<<endl;
cout<<"jenis cd :"<<jenis<<endl;
cout<<"kode judul cd :"<<kdjudul<<endl;
cout<<"judul cd :"<<judul<<endl;
cout<<"produser :"<<produser<<endl;
cout<<"harga :"<<harga<<endl;
cout<<"total bayar :"<<tobay<<endl;
cout<<"uang bayar :";cin>>ubay;ukem=ubay-tobay;
cout<<"kembali :"<<ukem<<endl;
getch();
}
Rabu, 28 Maret 2012
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar