#include <iostream>
using namespace std;
int main()
{
// We make array for placing room types including A, B, C
char arrRoomTypes[4] = {'A', 'B', 'C', '\0'};
while (true) {
// We declare a variable for input the types of rooms
char roomType;
cout << "Enter the type of room: ";
cin >> roomType;
// we compare entered room type with array room types
if (roomType == arrRoomTypes[0]) {
cout << "first class - 800$" << endl;
}
else if (roomType == arrRoomTypes[1]) {
cout << "second class - 650$" << endl;
}
else if (roomType == arrRoomTypes[2]) {
cout << "Sorry! we haven't this kind of room" << endl;
break;
}
}
return 0;
}
Comments
Leave a comment