-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSource.cpp
More file actions
38 lines (37 loc) · 817 Bytes
/
Source.cpp
File metadata and controls
38 lines (37 loc) · 817 Bytes
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
#include<iostream>
#include<fstream>
#include<Windows.h>
#include"Functions.h"
using namespace std;
int main() {
ArchiveUsers();
while (true) {
cout << "Enter the option you wish to execute:";
cout << "\n1.Add users\n2.Issue books to users\n3.Return books from users\n4.Search books\n5.Add Books\nEnter your option: ";
int option;
cin >> option;
switch (option) {
case 1:
AddUserToDatabase();
break;
case 2:
IssueBook();
break;
case 3:
ReturnBooks();
break;
case 4:
searchBook();
break;
case 5:
AddBookToLibrary();
break;
default:
cout << "Wrong option entered! Please try again!\n";
Sleep(2000);
}
system("CLS");
cout << "\nDo you wish to exit? Press F to exit. Press any other key to continue!";
}
return 0;
}