Repository navigation
Expand file tree
/
Copy pathmain.cpp
More file actions
47 lines (41 loc) · 1.38 KB
/
Copy pathmain.cpp
File metadata and controls
47 lines (41 loc) · 1.38 KB
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
#include "functions.cpp"
int main() {
cout << "\n\n*********************"<<endl;
cout << "VEHICLE RENTAL SYSTEM" << endl;
cout << "*********************\n\n";
cout << "1. Admin login/signup" << endl;
cout << "2. User login/signup" << endl;
cout << "3. Exit\n" << endl;
while (true) {
cout << "\nEnter your choice: ";
cin >> choice;
if (strcmp(choice, "1") == 0) {
cout << "\n1. Login" << endl;
cout << "2. Signup\n" << endl;
cout << "\nEnter your choice: ";
cin >> choice;
if (strcmp(choice, "1") == 0)
adminlogin();
else if (strcmp(choice, "2") == 0)
adminsignup();
else
cout << "\nInvalid input...try again" << endl;
} else if (strcmp(choice, "2") == 0) {
cout << "\n1. Login" << endl;
cout << "2. Signup\n" << endl;
cout << "\nEnter your choice: ";
cin >> choice;
if (strcmp(choice, "1") == 0)
userlogin();
else if (strcmp(choice, "2") == 0)
usersignup();
else
cout << "\nInvalid input...try again" << endl;
} else if (strcmp(choice, "3") == 0) {
exit(0);
} else {
cout << "\nInvalid input...try again" << endl;
}
}
return 0;
}