#include<iostream>
usingnamespace std;
int main()
{
int x;
int y;
int a[10];
int z;
for (y = 0; y <= 10; y++)
{
cout << "welcome to airlaine resvition system ";
cout << "\n plase press 1 for first class or 2 for economy class";
cin >> x;
do
{
cout << "Pick a seat in First class ";
cin >> a[y];
for (z = 0; z<y; z++) if (a[y] == a[z]) {
cout << "Seat taken. ";
}
} while (z != y);
if (a[y] <= 5)
{
cout << "your seats in firs class is " << a[y];
}
else
{
cout << "wrong number";
}
do {
cout << "Pick a seat in economy class ";
cin >> a[y];
for (z = 0; z<y; z++) if (a[y] == a[z]) {
cout << "\nSeat taken!!! ";
}
} while (z != y);
if (5< a[y] <10 )
{
cout << "\nyour seats in firs class is " << a[y];
}
else
{
cout << "\nwrong number";
}
}
}