#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
//////////////////////////////////////***************//////////////////////////
usingnamespace std ;
struct guest /*to store data of guests*/
{
char name[30];
int card ;
char adress[50];
};
main ()
{ int a,b,c,d,e,f,g,h,i,m,n;
guest z[100];
cout<<endl<<endl<<" ******"<<endl<<" Welcome"<<endl<<" To The PEARL CONTINENTAL"<<endl<<" ******"<<endl;
system("pause");
system("cls");
cout<<"How many Rooms you want????\n";
cin>>m;
i=1;
while(i<=m)
{ system("cls");
srand(time(NULL));
f=rand()%100;
cout<<" Room "<<i<<" data\n";
cout<<"Which type of Room you want :" <<endl<<"1:Royal Sweet 2:Average Sweet";
cout<<endl;
cin>>a;
if(a==1)
{cout<<"1:Package stay 2:Manual stay\n";
cin>>b;
if (b==1)
{
cout<<"\nYour room number is:"<<f;
cout<<"\n1:3 Days 2 Nights : 3000 Rs\n2:7 Days 6 Nights : 6000 Rs\n3:15 Days 14 Nights : 10000 Rs\n";
cin>>c;
cout<<"\nEnter your name:";
gets(z[i].name);
gets(z[i].name);
cout<<"Enter your ID card number:";
cin>>z[i].card;
cout<<"Enter your Adress:";
gets(z[i].adress);
gets(z[i].adress);
}
elseif(b==2)
{
cout<<"\nYour room number is:"<<f;
cout<<"\nHow many days you want to stay ?\n";
cin>>d;
e=d*1500;
cout<<"Your amount is:"<<e<<"Rs";
cout<<"\nEnter your name:";
gets(z[i].name);
gets(z[i].name);
cout<<"Enter your ID card number:";
cin>>z[i].card;
cout<<"Enter your Adress:";
gets(z[i].adress);
gets(z[i].adress);
}
}
elseif(a==2)
{cout<<"1:Package stay 2:Manual stay\n";
cin>>b;
if (b==1)
{ cout<<"\nYour room number is:"<<f;
cout<<"\n1:3 Days 2 Nights : 2500 Rs\n2:7 Days 6 Nights : 4500 Rs\n3:15 Days 14 Nights : 8000 Rs\n";
cin>>c;
cout<<"\nEnter your name:";
gets(z[i].name);
gets(z[i].name);
cout<<"Enter your ID card number:";
cin>>z[i].card;
cout<<"Enter your Adress:";
gets(z[i].adress);
gets(z[i].adress);
}
elseif(b==2)
{
cout<<"\nYour room number is:"<<f;
cout<<"\nHow many days you want to stay ?\n";
cin>>n;
h=n*1000;
cout<<"Your amount is:"<<g<<"Rs";
cout<<"\nEnter your name:";
gets(z[i].name);
gets(z[i].name);
cout<<"Enter your ID card number:";
cin>>z[i].card;
cout<<"Enter your Adress:";
gets(z[i].adress);
gets(z[i].adress);
}
}
i++;
}
cout<<"Your total amount is :"<<e+g;
return 0;
}