#include <iostream.h>
#include <conio.h>
main()
{
char napeny[30],kdkam,kdkel,*nakam,*kelas,*souvenir,tanya;
int lama,b_sewa,b_admin=75000,totbay;
atas:
cout<<"\t PENGINAPAN SEDAYI INDAH\n"<<endl;
cout<<"*******************************"<<endl;
cout<<"Nama Penyewa\t: ";cin>>napeny;
cout<<endl;
cout<<"------[PILIHAN KAMAR]------"<<endl;
cout<<"A.ANYELIR"<<endl;
cout<<" 1.VIP Rp.350000"<<endl;
cout<<" 2.KELAS 1 Rp.250000"<<endl;
cout<<" 3.KELAS 2 Rp.150000"<<endl;
cout<<"B.CEMPAKA"<<endl;
cout<<" 1.VIP Rp.500000"<<endl;
cout<<" 2.KELAS 1 Rp.400000"<<endl;
cout<<" 3.KELAS 2 Rp.300000"<<endl;
cout<<"C.MELATI"<<endl;
cout<<" 1.VIP Rp.1000000"<<endl;
cout<<" 2.KELAS 1 Rp.750000"<<endl;
cout<<" 3.KELAS 2 Rp.650000"<<endl;
cout<<"Kode Kamar [A/B/C]\t: ";cin>>kdkam;
cout<<"Kode Kelas [1/2/3]\t: ";cin>>kdkel;
cout<<"Lama Menginap\t: ";cin>>lama;cout<<" hari"<<endl;
if (kdkam=='A'||kdkam=='a')
{ nakam="ANYELIR";
if (kdkel=='1')
{ kelas="VIP";
b_sewa=350000;
}
else if (kdkel=='2')
{ kelas="KELAS 1";
b_sewa=250000;
}
if (kdkel=='3')
{ kelas="KELAS 2";
b_sewa=150000;
}
}
else if (kdkam=='B'||kdkam=='b')
{ nakam="CEMPAKA";
if (kdkel=='1')
{ kelas="VIP";
b_sewa=500000;
}
else if (kdkel=='2')
{ kelas="KELAS 1";
b_sewa=400000;
}
if (kdkel=='3')
{ kelas="KELAS 2";
b_sewa=300000;
}
}
else if (kdkam=='C'||kdkam=='c')
{ nakam="MELATI";
if (kdkel=='1')
{ kelas="VIP";
b_sewa=1000000;
}
else if (kdkel=='2')
{ kelas="KELAS 1";
b_sewa=750000;
}
if (kdkel=='3')
{ kelas="KELAS 2";
b_sewa=650000;
}
}
if (lama>7)
{souvenir="Free Lunch";}
else
{souvenir="-";}
cout<<"\t PENGINAPAN SEDAYI INDAH\n"<<endl;
cout<<"*************************************"<<endl;
cout<<"Nama Penyewa \t: "<<napeny<<endl;
cout<<"Nama Kamar \t: "<<nakam<<endl;
cout<<"Kelas \t: "<<kelas<<endl;
cout<<"Lama Menginap \t: "<<lama;cout<<"hari"<<endl;
cout<<"Biaya Sewa \t: Rp "<<b_sewa<<endl;
cout<<"Biaya Administrasi\t: Rp "<<b_admin<<endl;
totbay=(b_sewa*lama)+(b_admin);
cout<<"Total Biaya Sewa\t: Rp "<<totbay<<endl;
cout<<"*************************************"<<endl;
cout<<"Souvenir \t: "<<souvenir<<endl;
cout<<"Input Data Lagi [Y/N]? ";cin>>tanya;
if (tanya=='Y'||tanya=='y')
goto atas;
else
goto bawah;
getch();
bawah:
}
Tidak ada komentar:
Posting Komentar