1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#include <iostream>
using namespace std;
void checkAvail (string indate, string outdate, int rooms, char type, bool arg1[], bool arg2[], bool arg3[], bool arg4[], bool arg5[], bool arg6[])
{
if (type == '1')
{
int i = 0;
while (i <= rooms)
{
arg1 [i] = {true};
}
}
}
int main ()
{
bool standard [10] = {false, false, false, false, false, false, false, false, false, false};
bool moderate [10] = {false, false, false, false, false, false, false, false, false, false};
bool superior [10] = {false, false, false, false, false, false, false, false, false, false};
bool deluxe [10] = {false, false, false, false, false, false, false, false, false, false};
bool suite [5] = {false, false, false, false, false};
bool studio [5] = {false, false, false, false, false};
string checkInDate;
string checkOutDate;
char type;
int rooms;
cout << "welcome" << '\n';
cout << "please enter check-in date: " << '\n';
cin >> checkInDate;
cout << "please enter check-out date: " << '\n';
cin >> checkOutDate;
cout << "how many rooms you want?: " << '\n';
cin >> rooms;
cout << "please choose the type of room you want: " << '\n';
cout << "1 for STANDARD, 2 for MODERATE, 3 for SUPERIOR, 4 for DELUXE, 5 for SUITE and 6 for STUDIO: " << '\n';
cin >> type;
checkAvail (checkInDate, checkOutDate, rooms, type, standard, moderate, superior, deluxe, suite, studio);
}
|