Advertisement
mrDoubUET

Untitled

Mar 16th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. #include <conio.h>
  2. #include <iostream>
  3. #include <windows.h>
  4. #include "library.h"
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. char key;
  11.  
  12. M:
  13. system("cls");
  14. cout << "LIBRARY MANAGEMENT PROGRAM" << endl;
  15. cout << "1. dang nhap" << endl;
  16. cout << "2. thoat" << endl;
  17. while(key = _getch(), key < '1' || key > '2');
  18. if(key == '1')
  19. {
  20. system("cls");
  21. string u_name, pass_word;
  22. cout << "USERNAME: ";
  23. cin >> u_name;
  24. cout << "PASSWORD: ";
  25. cin >> pass_word;
  26. if(logIn(u_name, pass_word))
  27. {
  28. N:
  29. system("cls");
  30. cout << "LIBRARY MANAGEMENT PROGRAM" << endl;
  31. cout << "1. cho muon sach" << endl;
  32. cout << "2. tra sach" << endl;
  33. cout << "3. them, sua, xoa employee" << endl;
  34. cout << "4. hien thi toan bo employee" << endl;
  35. cout << "5. them, sua, xoa sach" << endl;
  36. cout << "6. tim sach" << endl;
  37. cout << "7. hien thi toan bo sach" << endl;
  38. cout << "8. them, sua, xoa user" << endl;
  39. cout << "9. dang xuat" << endl;
  40. while(key = _getch(), key < '1' || key > '9');
  41. goto N;
  42. }
  43. else
  44. {
  45. system("cls");
  46. cout << "sai username hoac sai password";
  47. Sleep(1000);
  48. goto M;
  49. }
  50. }
  51. else
  52. {
  53. return 0;
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement