Skip to content

Commit b6cc3bc

Browse files
committed
Refactor code for improved readability and consistency
- Updated function definitions to follow consistent formatting. - Enhanced menu display with version information and developer credits. - Improved binary file handling for better data management. - Added .gitignore file to exclude unnecessary files from version control.
1 parent 1427091 commit b6cc3bc

File tree

11 files changed

+447
-271
lines changed

11 files changed

+447
-271
lines changed

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Ignore build output and binaries
2+
*.exe
3+
*.bin
4+
*.obj
5+
*.o
6+
*.dll
7+
*.log
8+
9+
# Ignore VS Code settings
10+
.vscode/
11+
12+
# Ignore OS files
13+
Thumbs.db
14+
.DS_Store
15+
16+
# Ignore backup files
17+
*.bak
18+
*.tmp
19+
~$*
20+
21+
# Ignore other temp files
22+
*.user
23+
*.suo
24+
*.pch
25+
*.idb
26+
*.class
27+
*.pyc
28+
*.pyo
29+
*.pyd

changesach.bin

632 Bytes
Binary file not shown.

main.cpp

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,62 +8,65 @@
88

99
using namespace std;
1010

11-
int main() {
11+
int main()
12+
{
1213
int chon;
13-
do {
14+
do
15+
{
1416
Menu();
1517
cin >> chon;
1618
cout << "=========================" << endl;
17-
switch(chon) {
18-
case 1:
19-
ThemSach();
20-
break;
21-
case 2:
22-
SuaSach();
23-
break;
24-
case 3:
25-
XoaSach();
26-
break;
27-
case 4:
28-
ThemSinhVien();
29-
break;
30-
case 5:
31-
SuaSinhVien();
32-
break;
33-
case 6:
34-
XoaSinhVien();
35-
break;
36-
case 7:
37-
MuonSach();
38-
break;
39-
case 8:
40-
TraSach();
41-
break;
42-
case 9:
43-
ToanBoSach();
44-
break;
45-
case 10:
46-
ToanBoSinhVien();
47-
break;
48-
case 11:
49-
SachMotSinhVienMuon();
50-
break;
51-
case 12:
52-
ToanBoSachDuocMuon();
53-
break;
54-
case 13:
55-
Thoat();
56-
break;
19+
switch (chon)
20+
{
21+
case 1:
22+
ThemSach();
23+
break;
24+
case 2:
25+
SuaSach();
26+
break;
27+
case 3:
28+
XoaSach();
29+
break;
30+
case 4:
31+
ThemSinhVien();
32+
break;
33+
case 5:
34+
SuaSinhVien();
35+
break;
36+
case 6:
37+
XoaSinhVien();
38+
break;
39+
case 7:
40+
MuonSach();
41+
break;
42+
case 8:
43+
TraSach();
44+
break;
45+
case 9:
46+
ToanBoSach();
47+
break;
48+
case 10:
49+
ToanBoSinhVien();
50+
break;
51+
case 11:
52+
SachMotSinhVienMuon();
53+
break;
54+
case 12:
55+
ToanBoSachDuocMuon();
56+
break;
57+
case 13:
58+
Thoat();
59+
break;
5760
}
58-
if(chon != 13) {
61+
if (chon != 13)
62+
{
5963
cout << endl;
60-
cout << "========================="<<endl;
64+
cout << "=========================" << endl;
6165
cout << "=> Nhan Enter de tro ve !";
6266
cin.ignore();
6367
cin.get();
6468
system("clear");
6569
}
66-
}
67-
while(chon != 13);
68-
return 0;
70+
} while (chon != 13);
71+
return 0;
6972
}

0 commit comments

Comments
 (0)