Advertisement
jasperlow

Untitled

Feb 14th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. #include<stdio.h>
  2. // #include<conio.h>
  3. #include<stdlib.h>
  4. #include<string.h>
  5. // #include<ctype.h>
  6.  
  7. void admin() {
  8. printf("DEBUG: admin() executed\n");
  9. char pass[21];
  10. printf("Enter Password: ");
  11. scanf("%[^\n]s", pass);
  12. printf("DEBUG:: Password %s\n",pass); // Check Value, Delete This Line Later
  13. int result = strcmp(pass,"admin") ;
  14. if(result==0){
  15. printf("Password is admin");
  16. }else{
  17. printf("Password isn't admin");
  18. }
  19. // char pass[21];
  20. // int ploop = 1;
  21. // int in = 1;
  22. // int pass1;
  23. // system("cls");
  24. // for(ploop = 1; ploop<=in;) {
  25. // printf("Enter Password: ");
  26. // scanf_s("%s",&pass);
  27. // pass1 = strcmpi(pass, "admin");
  28. // if (pass1 == 0)
  29. // {
  30. // system("cls");
  31. // in = 0;
  32. // printf("Password Confirm \n\n\n");
  33. // admin2();
  34. // } else {
  35. // system("cls");
  36. // in = 1;
  37. // printf("Access Denied \n\n\n");
  38. // }
  39. // }
  40. }
  41.  
  42. void admin2() {
  43. // int i,w;
  44. // int item_code[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
  45. // int item_code2;
  46. // printf("Welcome: Admin \n\n");
  47. // printf("MENU");
  48. // printf("What would you like to order:\n");
  49. // printf("Food/Price\n");
  50. // printf("[1]Fried Chicken/P160 \n");
  51. // printf("[2]Spaghetti/P150\n");
  52. // printf("[3]Beef Steak/P120\n");
  53. // printf("[4]Pork Chop/P100\n");
  54. // printf("[5]Longanisa/P190\n");
  55. // printf("[6]Fried Bangus/P180\n");
  56. // printf("[7]Roast Chicken/P100\n");
  57. // printf("[8]Sharkfin/P170\n");
  58. // printf("[9]Beef Tapa/P140\n");
  59. // printf("[10]BBQ Chicken/P190\n");
  60. // printf("[11]Calamari/P180\n");
  61. // printf("[12]Beef Salpicao/P110\n");
  62. // printf("[13]Fried Rice/P170\n");
  63. // printf("[14]Tempura/P190\n");
  64. // printf("[15]Cream Dory/P100\n");
  65. // printf("[16]Jellyfish/P120\n");
  66. // printf("[17]Lechon/P300\n");
  67. // printf("[18]Mash Potato/P150\n");
  68. // printf("[19]Halo-Halo/P120\n");
  69. // printf("[20]Lecheflan/P140\n");
  70. // printf("Please enter how many orders do you want: ");
  71. // scanf("%d",&w);
  72. // for(int j=0;j<w;j++)
  73. // {
  74. // printf("Enter Item Code: ");
  75. // scanf("%d",&item_code2);
  76. // }
  77. // for(i=0;i<w;i++)
  78. // {
  79. // printf("%d",item_code2);
  80. // }
  81. }
  82.  
  83. void cashier() {
  84. }
  85.  
  86. void server() {
  87. }
  88.  
  89. int main() {
  90. int choice;
  91. // system("cls");
  92. printf("\t \t \t WELCOME TO BON'S ORDERING SYSTEM \n");
  93. printf("[1] Admin \n");
  94. printf("[2] Cashier \n");
  95. printf("[3] Server \n");
  96. printf("[4] Waitress \n");
  97. printf("[5] Hostess \n");
  98. printf("Please Enter Your Choice: ");
  99. scanf("%d",&choice);
  100. while ((getchar()) != '\n'); // remove \n when user enter integer with ENTER key
  101. printf("DEBUG:: Choice %d\n",choice); // Check Value, Delete This Line Later
  102. switch(choice) {
  103. case 1:
  104. admin();
  105. break;
  106. }
  107. // system("PAUSE");
  108. return 0;
  109. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement