# include<iostream>
using std::cout;
using std::cin;
using std::endl;
# include<fstream>
using std::ofstream;
# include<cstdlib>
using std::cerr;
using std::ios;
int main()
{
	ofstream outTravelsys("travel.dat",ios::out);
	if(!outTravelsys)
	{
		cerr<<"File could not be opened"<<endl;
		exit(1);
	}
	char name1[20];
	char name2[20];
	int first[5]={0};
	int Eco[5]={0};
	int choice;
	int seat,number,name;
	cout<<"OoooOoooOOOoooOOOoooOOOoooOOOoooOOOoooOoooOoooO\n\n";

	cout<<"*****WELCOME TO OUR TRAVEL RESEVATIONS SYS.*****\n\n";

    
    cout<<"The First Class seat Chrat\t"<<endl;
	for(int j=0;j<5;j++)
	cout<<first[j]<<"\n";;
	cout<<"The Economy Class Seats Chart\t"<<endl;;
	for(j=0;j<5;j++)
		cout<<Eco[j]<<"\n";
	cout<<"\n";
	cout<<"Oo_____________________________oO\n\n";
	cout<<"Please type 1 for first class\n\n";
	cout<<"please type 2 for economic class\n\n";
	cin>>choice;
	switch(choice)
	{
	case 1:
   
		cout<<" Enter the number, name and seat(^z)to end \n";
		
		while(cin>>number>>seat>>name1)
		{ 
			outTravelsys<<number<<' '<<seat<<' '<<name<<'\n';
			cout<<"*";
		}
		break;
	case 2:
        cout<<"Enter the name\n";
		
		cout<<"Enter the number of the seat (^z)to end \n";
		
		while(cin>>number>>seat>>name2)
		{
			outTravelsys<<number<<' '<<seat<<' '<<name<<'\n';
			cout<<"*";
		}
		break;
	default:
		cout<<"wrong choice ...try again"<<endl;
		break;
	}


outTravelsys.close();

	return 0;
}


		



	
