Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <iostream>
- #include <windows.h>
- #include "library.h"
- using namespace std;
- int main()
- {
- char key;
- M:
- system("cls");
- cout << "LIBRARY MANAGEMENT PROGRAM" << endl;
- cout << "1. dang nhap" << endl;
- cout << "2. thoat" << endl;
- while(key = _getch(), key < '1' || key > '2');
- if(key == '1')
- {
- system("cls");
- string u_name, pass_word;
- cout << "USERNAME: ";
- cin >> u_name;
- cout << "PASSWORD: ";
- cin >> pass_word;
- if(logIn(u_name, pass_word))
- {
- N:
- system("cls");
- cout << "LIBRARY MANAGEMENT PROGRAM" << endl;
- cout << "1. cho muon sach" << endl;
- cout << "2. tra sach" << endl;
- cout << "3. them, sua, xoa employee" << endl;
- cout << "4. hien thi toan bo employee" << endl;
- cout << "5. them, sua, xoa sach" << endl;
- cout << "6. tim sach" << endl;
- cout << "7. hien thi toan bo sach" << endl;
- cout << "8. them, sua, xoa user" << endl;
- cout << "9. dang xuat" << endl;
- while(key = _getch(), key < '1' || key > '9');
- goto N;
- }
- else
- {
- system("cls");
- cout << "sai username hoac sai password";
- Sleep(1000);
- goto M;
- }
- }
- else
- {
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement