Anda di halaman 1dari 3

#include<conio.

h>
#include<iostream.h>
#include<stdio.h>
main()
{
char atr,jwb;
char nm[25],nmp[20],nma[8],bns[20],lagi;
int pkt, hrga, hrgp, tot, pot, tobay, ubay, ukem;

clrscr();
lagi:
cout<<" Birthday Party 4 U"<<endl;
cout<<"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*"<<endl;
cout<<endl;
cout<<" Nama Pemesan : ";gets(nm);
cout<<" Jenis Paket"<<endl;
cout<<" [1] Paket Mewah Harga : Rp. 2.000.000,-"<<endl;
cout<<" [2] Paket Sedang Harga : Rp. 1.500.000,-"<<endl;
cout<<" [3] Paket Sederhana Harga : Rp. 1.000.000,-"<<endl;
cout<<"Jenis Paket Yang DiPilih [1/2/3] :";cin>>pkt;
cout<<"Jenis Atraksi"<<endl;
cout<<"[B] Badut, Harga : Rp. 300.000,-"<<endl;
cout<<"[S] Sulap, Harga : Rp. 500.000,-"<<endl;
cout<<"[P] Penyanyi Cilik, Harga : Rp. 600.000,-"<<endl;
cout<<"Jenis Atraksi Yang Dipilih [B/S/P] :",cin>>atr;
switch(pkt)
{
case 1:
strcpy(nmp,"Paket Mewah");
hrgp=2000000;
if(atr=='B'||atr=='b')
{
strcpy(nma,"Badut");
hrga=300000;
}
else if(atr=='S'||atr=='s')
{
strcpy(nma,"Sulap");
hrga=500000;
}
else if(atr=='P'||atr=='p')
{
strcpy(nma,"Penyanyi cilik");
hrga=600000;
}

break;
case 2:
strcpy(nmp,"Paket Sedang");
hrgp=1500000;
if(atr=='B'||atr=='b')
{
strcpy(nma,"Badut");
hrga=300000;
}
else if(atr=='S'||atr=='s')
{
strcpy(nma,"Sulap");
hrga=500000;
}
else if(atr=='P'||atr=='p')
{
strcpy(nma,"Penyanyi cilik");
hrga=600000;
}
break;
case 3:
strcpy(nmp,"Paket Sederhana");
hrgp=1000000;
if(atr=='B'||atr=='b')
{
strcpy(nma,"Badut");
hrga=300000;
}
else if(atr=='S'||atr=='s')
{
strcpy(nma,"Sulap");
hrga=500000;
}
else if(atr=='P'||atr=='p')
{
strcpy(nma,"Penyanyi cilik");
hrga=600000;
}
break;
default:
cout<<"Kode Salah"<<endl;
getch();
goto lagi;
break;
}
tot=hrgp+hrga;
if(tot>=2000000)
{
strcpy(bns,"Black Forets");
pot=0.1*tot;
}
else
{
strcpy(bns,"Maaf Tidak Dapat Bonus");
pot=0;
}
tobay=tot-pot;
clrscr();
cout<<" Birthday Party 4 U "<<endl;

cout<<"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
"<<endl;
cout<<endl;
cout<<"Nama Pemesan :";cout<<nm<<endl;
cout<<"Paket Pilihannya Adalah :"<<nmp<<endl;
cout<<"Harga Per-Paket :Rp."<<hrgp<<endl;
cout<<"Atraksi Pilihan :"<<nma;cout<<"jam"<<endl;
cout<<"Harga Atraksi :Rp."<<hrga<<endl;

cout<<"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
"<<endl;
cout<<endl;
cout<<"Bonus :"<<bns<<endl;
cout<<"Total Keseluruhan :Rp."<<tot<<endl;
cout<<"Potongan Yang DIPeroleh :Rp."<<pot<<endl;
cout<<"Total Bayar :Rp."<<tobay<<endl;
cout<<"Uang Bayar :Rp.";cin>>ubay;
ukem=ubay-tobay;
cout<<"Uang Kembali :Rp."<<ukem<<endl;

cout<<"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
"<<endl;
cout<<"Mau Input Data Lagi [Y/T] :";jwb=getch();
if(jwb=='Y'||jwb=='y')
goto lagi;
getch();
}