-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAINMENU.CPP
69 lines (69 loc) · 1.44 KB
/
MAINMENU.CPP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include<iostream.h>
#include<conio.h>
#define o1 gotoxy(31,1); \
cout<<"I.R.C.T.C"; \
gotoxy(25,2); \
cout<<"(INDIAN RAILWAY CATERING "; \
gotoxy(22,3); \
cout<<"AND TOURISM CORPORATION LIMITED)";
void main()
{ int op=1;
for(;;)
{ clrscr();
o1;
gotoxy(15,6);
cout<<"-------------------MENU----------------------";
gotoxy(14,8);
cout<<"-PASSENGER ZONE -";
gotoxy(14,10);
cout<<"-CREATE AN ACCOUNT"; //op=1
gotoxy(14,11);
cout<<"-LOGIN";//op=2
gotoxy(14,12);
cout<<"-CHECK PNR STATUS"; //op=3
gotoxy(45,8);
cout<<"-EMPLOYEE ZONE -"; //
gotoxy(45,10);
cout<<"-CREATE AN ACCOUNT"; //op=4
gotoxy(45,11);
cout<<"-LOGIN"; //op=5
gotoxy(14,15);
cout<<"-EXIT THE PROGRAM"; //op=6
if(op==1)
gotoxy(13,10);
else if(op==2)
gotoxy(13,11);
else if(op==3)
gotoxy(13,12);
else if(op==4)
gotoxy(44,10);
else if(op==5)
gotoxy(44,11);
else if(op==6)
gotoxy(13,15);
cout<<"->";
int a=getch();
if(a==0)
{ int b=getch();
if(b==80 && op!=3 && op!=6)
op++;
else if(b==80 && op==3)
op=6;
else if(b==77 && (op==1 || op==2))
op+=3;
else if(b==77 && op==3)
op=5;
else if(b==72 && (op==2 || op==3 || op==5))
op--;
else if(b==72 && op==6)
op=3;
else if(b==75 && (op==4 || op==5))
op-=3;
}
else if(a==13)
break;
}
clrscr();
cout<<op;
getch();
}