programming
programming
cpp : Defines
the entry point for the console
application.
#include "stdafx.h"
#include<iostream>
#include<conio.h>
#include<fstream>
#include<iomanip>
#include<string.h>
using namespace std;
void reserve_seat();
void available_flights();
void cancel_seat();
void Quit_program();
void change_seat();
int numseats=20;
int available;
int seatarray;
char l_name[30];
ofstream myfile;
struct passenger
{
char name[30];
int pass_number;
int cell_number;
char address[40];
}pass;
struct Seat
{
char pass_name[80];
int Available;
};
struct Seat SeatArray[1][10];
void main()
{
int c;
cout<<"**************WELCOM
E TO AIRWAYS RESERVATION
SYSTEM*************"<<endl;
cout <<"All "<< numseats << "
seats are available " << endl;
cout<<"Please enter your name
for login : ";
cin>>l_name;
system("CLS");
cout<<" What Do You Want To
Do ? "<<endl;
cout<<" 1) Reserve Seat
"<<endl;
cout<<" 2) Main Menu
"<<endl;
cout<<" 3) Available Flights
"<<endl;
cout<<" 4) Cancel Seat
"<<endl;
cout<<" 5) Change Seat
"<<endl;
cout<<" 6) Quit Program
"<<endl;
cout<<"Enter Your Choice :
"<<endl;
cin>>c;
if((c < 0) && (c > 5))
{
cout << "Invalid Choice" <<
endl;
}
else
switch(c)
{
case 1:
{
// programming.cpp : Defines
the entry point for the console
application.
#include "stdafx.h"
#include<iostream>
#include<conio.h>
#include<fstream>
#include<iomanip>
#include<string.h>
using namespace std;
void reserve_seat();
void available_flights();
void cancel_seat();
void Quit_program();
void change_seat();
int numseats=20;
int available;
int seatarray;
char l_name[30];
ofstream myfile;
struct passenger
{
char name[30];
int pass_number;
int cell_number;
char address[40];
}pass;
struct Seat
{
char pass_name[80];
int Available;
};
struct Seat SeatArray[1][10];
void main()
{
int c;
cout<<"**************WELCOM
E TO AIRWAYS RESERVATION
SYSTEM*************"<<endl;
cout <<"All "<< numseats << "
seats are available " << endl;
cout<<"Please enter your name
for login : ";
cin>>l_name;
system("CLS");
cout<<" What Do You Want To
Do ? "<<endl;
cout<<" 1) Reserve Seat
"<<endl;
cout<<" 2) Main Menu
"<<endl;
cout<<" 3) Available Flights
"<<endl;
cout<<" 4) Cancel Seat
"<<endl;
cout<<" 5) Change Seat
"<<endl;
cout<<" 6) Quit Program
"<<endl;
cout<<"Enter Your Choice :
"<<endl;
cin>>c;
if((c < 0) && (c > 5))
{
cout << "Invalid Choice" <<
endl;
}
else
switch(c)
{
case 1:
{