#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
main()
{
char kd_kamar,nm_tamu[20],kd_kls,nm_kls[10],nm_kamar[10];
int lama;
long bt,harga,total;
cout<<"=================================================="<<endl;
cout<<"\t\tHOTEL MAKMUR SEJAHTERA \n";
cout<<"=================================================="<<endl;
cout<<"Nama Penginap : ";gets(nm_tamu);
cout<<"=================================================="<<endl;
cout<<"Pilihan Kamar :\n";
cout<<"1. Liverpool \n";
cout<<"2. Arsenal \n";
cout<<"3. Chelsea \n";
cout<<"==================================================="<<endl;
cout<<"Input Pilihan Kamar [1/2/3] : ";cin>>kd_kamar;
cout<<"Input Pilihan Kelas [A.VIP/B.STANDARD] : ";cin>>kd_kls;
if (kd_kamar=='1')
{
strcpy(nm_kamar,"Liverpool");
if (kd_kls=='a'||kd_kls=='A')
{strcpy(nm_kls,"VIP");
bt=50000;
harga=250000;}
else
{strcpy(nm_kls,"STANDARD");
bt=0;
harga=250000;}
}
else if (kd_kamar=='2')
{
strcpy(nm_kamar,"Arsenal");
if (kd_kls=='a'||kd_kls=='A')
{strcpy(nm_kls,"VIP");
bt=50000;
harga=200000;}
else
{strcpy(nm_kls,"STANDARD");
bt=0;
harga=250000; }
}
else
{
strcpy(nm_kamar,"Chelsea");
if (kd_kls=='a'||kd_kls=='A')
{strcpy(nm_kls,"VIP");
bt=50000;
harga=250000;}
else
{strcpy(nm_kls,"STANDARD");
bt=0;
harga=250000;}
}
clrscr();
cout<<"\t\tHOTEL MAKMUR SEJAHTERA \n";
cout<<"==================================================="<<endl;
cout<<"Nama Penginap : "<<nm_tamu<<endl;
cout<<"Tipe Kamar : "<<nm_kamar<<endl;
cout<<"Kelas Kamar : "<<nm_kls<<endl;
cout<<"Harga Kamar : "<<harga<<endl;
cout<<"Biaya Tambahan : "<<bt<<endl;
cout<<"Lama Menginap : ";cin>>lama;
cout<<"==================================================="<<endl;
total=lama*harga+bt;
cout<<"Total : "<<total<<endl;
cout<<"==================================================="<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar