#include <iostream>
#include <stdlib.h>
#include <iomanip>
struct data{
char nama[40],hp[15];
};
struct data dt[5];
main() {
char ket;
int a,pilih,pil,lama,rusak;
int biaya=0;
int lagu,album,byk1,byk=0,kmb=0,byr;
int rus=0;
int cari,ketemu;
int A[100] ;
int data[6];
int temp;
double total=0;
clrscr();
uang:
cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\t STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\t\tNama\t : ";cin>>dt[i].nama;
cout<<"\t\tNo.HP\t : ";cin>>dt[i].hp;
awal:
cout<<"\n\t\tPilihan Studio: ";
cout<<"\n\t\t\t1. Rental Studio Reguler";
cout<<"\n\t\t\t2. Rental Studio Paket";
cout<<"\n\t\t\t3. Recording";
cout<<"\n\t\tPilihan : ";cin>>pilih;
clrscr();
start:
{ cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\t WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\n\n\t\tRental Studio Reguler";
cout<<"\n\t\t\t1. High Quality Studio";
cout<<"\n\t\t\t2. Middle Quality Studio";
cout<<"\n\t\tMasukkan pilihan : ";cin>>pil;
if (pil==1 || pil==2){;}
cout<<"\n\nPilihan anda salah..\nMasukan pilihan lagi.\n\n";
getch();
clrscr();
goto start; }
clrscr();
}
else if (pilih==2)
start2
cout<<" =====\t\t\t\t WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\n\n\t\tRental Studio Paket";
cout<<"\n\t\t\t1. High Quality Studio Paket 2 jam";
cout<<"\n\t\t\t2. High Quality Studio Paket 4 jam";
cout<<"\n\t\t\t3. Middle Quality Studio Paket 2 jam";
cout<<"\n\t\t\t4. Middle Quality Studio Paket 4 jam";
cout<<"\n\t\tMasukkan pilihan : ";cin>>pil2;
if(pil2==1 || pil2==2){;}
else if (pil2==3 || pil2==4){;}
else
{cout<<"\n\nPilihan anda salah..\nMasukan pilihan lagi.\n\n";
getch();
clrscr();
goto start2; }
clrscr();
(pilih==3)
start3:
{ cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\t WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\n\n\t\tRecording";
cout<<"\n\t\t\t1. Just Recording";
cout<<"\n\t\t\t2. Mixing";
cout<<"\n\t\t\t3. Mastering";
cout<<"\n\t\tMasukkan pilihan : ";cin>>pil3;
if(pil3==1 || pil3==2){;}
else if(pil3==3){;}
else
{ cout<<"\n\nPilihan anda salah..\nMasukan pilihan lagi.\n\n";
getch();
clrscr();
goto start3; }
if(pil3==2){
cout<<"\n\t\tBanyaknya lagu\t : ";cin>>lagu;
total=total + (50000 * lagu);}
else if(pil3==3){
cout<<"\n\t\tBanyaknya album\t : ";cin>>album;
total=total + (50000 * album);}
clrscr();
}
else {
cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\t WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"Pilihan salah...\nSilahkan masukan pilihan menu lagi.\n\n";
goto awal;
clrscr();
}
bomm:
cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\ WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\n\n\t\tApakah ada trouble?";
cout<<"\n\t\t\t1. Tidak ada Kerusakan";
cout<<"\n\t\t\t2. Senar gitar putus";
cout<<"\n\t\t\t3. Senar bass putus(no 1 - 2)";
cout<<"\n\t\t\t4. Senar bass putus(no.3 - 4)";
cout<<"\n\t\t\t5. Symbal pecah";
cout<<"\n\t\t\t6. Membran jebol";
cout<<"\n\t\tKerusakan : ";cin>>rusak;
if(rusak==1||rusak==2||rusak==3||rusak==4||rusak==5||rusak==6){;}
else { cout<<"\n\nPilihan anda salah..\nMasukan pilihan lagi.\n\n";
getch();
clrscr();
goto bomm; }
if(rusak==2){
cout<<"\n\t\tBanyaknya senar yang putus\t : ";cin>>byk1;
byk=byk + (2000 * byk1);}
else if(rusak==3){
cout<<"\n\t\tBanyaknya senar yang putus\t : ";cin>>byk1;
byk=byk + (15000 * byk1);}
else if(rusak==4){
cout<<"\n\t\tBanyaknya senar yang putus\t : ";cin>>byk1;
byk=byk1 + (30000 * byk1);}
else if (rusak==5){
cout<<"\n\t\tBanyaknya symbal yang pecah\t : ";cin>>byk1;}
else if (rusak==6){
cout<<"\n\t\tBanyaknya membran yang jebol\t : ";cin>>byk1;}
cout<<"\n\t\tApakah masih ada kerusakan [Y/T]? ";cin>>ket;
while (ket=='Y'||ket=='y'){
clrscr();
goto bomm; }
//PERHITUNGAN
if(pil==1){
cout<<"\n\t\tLama Rental (jam)\t : ";cin>>lama;
total=total + (20000 * lama);}
else if (pil==2){
cout<<"\n\t\tLama Rental (jam)\t : ";cin>>lama;
total = total + (15000 * lama);}
else if (pil3==1) {
cout<<"\n\t\tLama Rental (jam)\t : ";cin>>lama;
total=total + ((500000 * lama)/6); }
//output
clrscr();
cout<<" ============================================================================== "<<endl;
cout<<" =====\t\t\t\t WIDORO STUDIO \t\t\t\t ===== "<<endl;
cout<<" ============================================================================== "<<endl;
cout<<"\n\t\tNama\t\t : "<<dt[i].nama;
cout<<"\n\t\tNo. HP\t\t : "<<dt[i].hp;
cout<<"\n\t\tPilihan menu\t : "<<pilih;
if(pilih==1)
{ cout<<". Rental Studio Reguler";
cout<<"\n\t\tPilihan Paket\t : "<<pil;
if (pil==1)
{ cout<<". High Quality Studio"; }
else if (pil==2)
{ cout<<". Middle Quality Studio";}
}
else if(pilih==2)
{ cout<<". Rental Studio Paket";
cout<<"\n\t\tPilihan Paket\t : "<<pil2;
if (pil2==1)
{ cout<<". High Quality Studio Paket 2 jam"; }
else if (pil2==2)
{ cout<<". High Quality Studio Paket 4 jam"; }
else if (pil2==3)
{ cout<<". Middle Quality Studio Paket 2 jam"; }
else if (pil2==4)
{ cout<<". Middle Quality Studio Paket 4 jam"; }
}
else if (pilih==3)
{ cout<<". Recording";
cout<<"\n\t\tPilihan Paket\t : "<<pil3;
if (pil3==1)
{ cout<<". Just Recording";}
else if (pil3==2)
{ cout<<". Mixing";
cout<<"\n\t\tBanyaknya lagu\t : "<<lagu<<" lagu";}
else if (pil3==3)
{ cout<<". Mastering";
cout<<"\n\t\tBanyaknya album\t : "<<album<<" album";}
}
cout<<"\n\t\tTrouble\t\t : "<<rusak;
switch(rusak)
{ case 1: cout<<". Ganti rugi 0";
break;
case 2: cout<<". Ganti rugi Rp 2000,- /senar"
break;
case 3: cout<<". Ganti rugi Rp 15000,- /senar";
break;
case 4: cout<<". Ganti rugi Rp 30000,- /senar";
break;
case 5: cout<<". Ganti rugi Ganti barang";
break;
case 6: cout<<". Ganti rugi Ganti barang";
break;
}
if(rusak==1){ cout<<"\n\t\tBiaya Kerusakan : Rp 0 ";}
else if(rusak==2){ cout<<"\n\t\tBiaya Kerusakan\t : "<<"Rp "<<byk;}
else if(rusak==3){ cout<<"\n\t\tBiaya Kerusakan\t : "<<"Rp "<<byk;}
else if(rusak==4){ cout<<"\n\t\tBiaya Kerusakan\t : "<<"Rp "<<byk;}
else if(rusak==5){ cout<<"\n\t\tGanti Kerusakan\t : "<<byk1<<" symbal";}
else if(rusak==6){ cout<<"\n\t\tGanti Kerusakan\t : "<<byk1<<" membran";}
if(pilih==1||pilih==3){
cout<<"\n\t\tLama Rental\t : "<<lama<<"jam"; }
{ cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil==2)
{ cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
}
else if(pilih==2){
if(pil2==1)
{ total=total + 25000;
cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil2==2)
{ total=total + 45000;
cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil2==3)
{ total=total + 30000;
cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil2==4)
{ total=total + 55000;
cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
}
else if(pilih==3){
if(pil3==1)
{cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil3==2)
{cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
else if(pil3==3)
{cout<<"\n\t\tBiaya\t\t : "<<"Rp "<<total;}
}
if(rusak==1||rusak==2||rusak==3||rusak==4){
biaya = biaya + total + byk ;
cout<<"\n\n\t\tTotal pembayaran : "<<"Rp "<<biaya;}
else if(rusak==5){
biaya = biaya + total;
cout<<"\n\n\t\tTotal pembayaran : "<<"Rp "<<biaya<<" + "<<byk1<<" symbal";}
else if(rusak==6){
biaya = biaya + total;
cout<<"\n\n\t\tTotal pembayaran : "<<"Rp "<<biaya<<" + "<<byk1<<" membran";}
cout<<"\n\t\tUang bayar\t : Rp ";cin>>byr;
if(byr >=biaya){
kmb = kmb + (byr - biaya);
cout<<"\n\t\tUang kembali\t : "<<"Rp "<<kmb;}
else{
cout<<"\n\t\tMaaf tidak terima kasbon ataupun utang..!!";
getch();
clrscr();
goto uang;
getch();
}
Tidak ada komentar:
Posting Komentar