RAILWAY RESERVATION SYSTEM
INDEX
What is the procedure for railway reservation?
Reservation of berths for return journey. —(a) passengers desiring reservations to be made on the return journey at the starting station will be asked to fill in a requisition form indicating the train number and date on which reservation is required to be made on the return journey.
Reservation of berths for return journey. —(a) passengers desiring reservations to be made on the return journey at the starting station will be asked to fill in a requisition form indicating the train number and date on which reservation is required to be made on the return journey.
Certificate Detail's
Railway Reservation System Download CPP File
railway_reservation_system.txt |
HEADER FILES USED IN PROJECT
#include<fstream.h>
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#include<stdio.h>
#define sgn(x) (x)>0 ? 1 : ( (x)<0 ? -1 : 0 )
int ch,n;
struct date d;
struct time t;
char *west[]={"MUMBAI","GWALIOR","AGRA","BHUSAWAL","EXIT"};
char *north[]={"DELHI","AMBALA","JAMMU-TAWI","SHIMLA","EXIT"};
char *east[]={"HOWRAH","PATNA","DHANBAD","KHARAGPUR","EXIT"};
char *south[]={"BANGALORE","CHENNAI","COIMBATORE","COCHIN","EXIT"};
char *mains[]={"1. NORTHERN RAILWAYS","2. SOUTHERN RAILWAYS","3. EASTERN RAILWAYS","4. WESTERN RAILWAYS","5. QUIT"};
char *each[]={"TICKET BOOKING","INQUIRY","RESERVATION","EXIT"};
char *cls[]={"FIRST CLASS","SLEEPER","SECOND CLASS"};
char *inq[]={"Inquiry","Developers"};
int westp[]={100,300,300,500};
int eastp[]={100,300,300,500};
int northp[]={100,300,300,500};
int southp[]={100,300,300,500};
int seat[4][4]={{10,10,10,10},{10,10,10,10},{10,10,10,10},{10,10,10,10}};
void reserve(int);
void fare(int,int,char **,int *,int);
void inquiry(void);
int move(int x1,int y1,int x2,int y2,char c);
int animate(char *title,int x1,int x2,int y1,int y2);
int domenu(char **items,int noi,int maxx,int xtob,int ytob);
void clearmake(int);
void highlight(int in,int noi,int maxx,int xtob,int ytob,char **items);
void print(int ypos,char *message);
void makebox(int x1, int y1, int x2, int y2);
void main()
{
void ticbook(int);
void mainmenu(void);
do
{
mainmenu();
clrscr();
makebox(1,1,79,24);
switch(ch)
{
case 1:
print(4," ");
animate("NORTHERN",78,4,30,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(1);
break;
case 2:
inquiry();
break;
case 3:
reserve(1);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 2:
print(4," ");
animate("SOUTHERN",78,4,30,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(2);
break;
case 2:
inquiry();
break;
case 3:
reserve(2);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 3:
print(4," ");
animate("EASTERN",79,4,31,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(3);
break;
case 2:
inquiry();
break;
case 3:
reserve(3);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 4:
#include<fstream.h>
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<string.h>
#include<stdlib.h>
#include<ctype.h>
#include<stdio.h>
#define sgn(x) (x)>0 ? 1 : ( (x)<0 ? -1 : 0 )
int ch,n;
struct date d;
struct time t;
char *west[]={"MUMBAI","GWALIOR","AGRA","BHUSAWAL","EXIT"};
char *north[]={"DELHI","AMBALA","JAMMU-TAWI","SHIMLA","EXIT"};
char *east[]={"HOWRAH","PATNA","DHANBAD","KHARAGPUR","EXIT"};
char *south[]={"BANGALORE","CHENNAI","COIMBATORE","COCHIN","EXIT"};
char *mains[]={"1. NORTHERN RAILWAYS","2. SOUTHERN RAILWAYS","3. EASTERN RAILWAYS","4. WESTERN RAILWAYS","5. QUIT"};
char *each[]={"TICKET BOOKING","INQUIRY","RESERVATION","EXIT"};
char *cls[]={"FIRST CLASS","SLEEPER","SECOND CLASS"};
char *inq[]={"Inquiry","Developers"};
int westp[]={100,300,300,500};
int eastp[]={100,300,300,500};
int northp[]={100,300,300,500};
int southp[]={100,300,300,500};
int seat[4][4]={{10,10,10,10},{10,10,10,10},{10,10,10,10},{10,10,10,10}};
void reserve(int);
void fare(int,int,char **,int *,int);
void inquiry(void);
int move(int x1,int y1,int x2,int y2,char c);
int animate(char *title,int x1,int x2,int y1,int y2);
int domenu(char **items,int noi,int maxx,int xtob,int ytob);
void clearmake(int);
void highlight(int in,int noi,int maxx,int xtob,int ytob,char **items);
void print(int ypos,char *message);
void makebox(int x1, int y1, int x2, int y2);
void main()
{
void ticbook(int);
void mainmenu(void);
do
{
mainmenu();
clrscr();
makebox(1,1,79,24);
switch(ch)
{
case 1:
print(4," ");
animate("NORTHERN",78,4,30,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(1);
break;
case 2:
inquiry();
break;
case 3:
reserve(1);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 2:
print(4," ");
animate("SOUTHERN",78,4,30,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(2);
break;
case 2:
inquiry();
break;
case 3:
reserve(2);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 3:
print(4," ");
animate("EASTERN",79,4,31,4);
animate("RAILWAYS",3,4,41,4);
gotoxy(31,7);
cout<<"**CHOOSE OPTIONS**";
do
{
n=domenu(each,4,16,30,10);
gotoxy(25,22);
switch(n)
{
case 1:
ticbook(3);
break;
case 2:
inquiry();
break;
case 3:
reserve(3);
break;
default:
break;
}
}while(n>0&&n<4);
n=0;
break;
case 4: