2. int csn=0;
int srr,ssr,dc,ec;
void swap(char *,char *);
void date();
int leap(int);
struct dat
{
int d,m,y,lp;
};
dat dt;
int md[12]={31,28,31,30,31,30,31,31,30,31,30,31};
void time();
void distm();
void tmchg();
struct tim
{
int h,m,s,t;
char tt[5],x[5];
};
tim tm;
char ta[5]="A.M.0",tb[5]="P.M.0";
2
3. void main()
{
clrscr();
//wel();
adm();
getch();
}
void chkmn()
{
int g=0;
clrscr();
sparks();
bdr();
gotoxy(10,40);
cout<<"Press ESC to Exit the Program ";
if(kbhit()==8)
{
gotoxy(15,45);
cout<<"Terminating Program..........";
delay(1000);
exit(0);
3
4. }
gotoxy(15,30);
textcolor(LIGHTRED);
cprintf("Enter your Name : ");
gets(usnm);
gotoxy(5,43);
g=strcmpi(usnm,ad);
if(g==0)
{
pswrd();
}
if(g!=0)
{
gst();
}
}
void adm()
{
gotoxy(6,6);
int ch;
while(1)
{
4
5. clrscr();
gd();
gotoxy(20,6);
textcolor(LIGHTBLUE);
cprintf("ADMINISTRATER MENU");
gotoxy(8,9);
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~"
<<"nnt1. Displays the list & details of all Travellers."
<<"nnt2. Go to the Guest Menu."
<<"nnt3. Searches the Traveller."
<<"nnt4. Edits the Traveller's Details."
<<"nnt5. Deletes the Traveller's Details."
<<"nnt6. Go to User Menu"
<<"nnt7. Exits the Program."
<<"nnntt Your choice : ";
cin>>ch;
switch(ch)
{
case 1 :
dslst();
break;
case 2 :
gst();
5
6. break;
case 3 :
srch();
break;
case 4 :
edtmn();
break;
case 5 :
delmn();
break;
case 6 :
chkmn();
break;
case 7 :
exit(0);
default :
cout<<" Wrong choice entered !!!!! " ;
}
getch();
}
//getch();
}
void srch()
6
7. {
int ch;
while(1)
{
clrscr();
cout<<"nnttSEARCH MENU"
<<"nnnt1. Search by Code."
<<"nnt2. Search by Name."
<<"nnt3. Go back to Administrator Menu."
<<"nnt4. Exit the Program."
<<"nnnttYour choice : ";
cin>>ch;
switch(ch)
{
case 1 :
src();
break;
case 2 :
srn();
break;
case 3 :
adm();
7