Advertisement
ItsMeLucifer

PC-Shell Program

Oct 22nd, 2019
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. knowledge base conaobiad
  2. facets
  3. single yes;
  4. czystudent:
  5. query "Czy jestes studentem:"
  6. val oneof {"tak","nie"};
  7. lubizdrowo:
  8. query "Czy lubisz jesc zdrowo:"
  9. val oneof {"tak","nie"};
  10. wege:
  11. query "Czy jesteś wege:"
  12. val oneof {"tak","nie"};
  13. glutenlaktoza:
  14. query "Czy tolerujesz gluten/laktoze:"
  15. val oneof {"Nie toleruje glutenu i laktozy","Toleruje gluten i laktoze","Nie toleruje laktozy, ale toleruje gluten","Toleruje laktoze, ale nie toleruje glutenu"};
  16. kuchnia:
  17. query "Jaka kuchnie preferujesz:"
  18. val oneof {"Wloska","Polska","Japonska","Obojetnie"};
  19. obiad:
  20. ask no;
  21. end;
  22. rules
  23. 01: obiad = "Kebab" if
  24. czystudent="tak",
  25. lubizdrowo="nie",
  26. wege="nie",
  27. (glutenlaktoza="Toleruje gluten i laktoze" | glutenlaktoza="Nie toleruje laktozy, ale toleruje gluten"),
  28. kuchnia="Obojetnie";
  29. 02: obiad = "Warzywa na patelnie z kasza jaglana i kurkuma" if
  30. lubizdrowo="tak",
  31. (glutenlaktoza="Nie toleruje glutenu i laktozy" | glutenlaktoza="Toleruje laktoze, ale nie toleruje glutenu"),
  32. kuchnia="Obojetnie";
  33. 03: obiad = "Spaghetti Carbonara" if
  34. lubizdrowo="tak",
  35. wege="nie",
  36. glutenlaktoza="Toleruje gluten i laktoze",
  37. kuchnia="Wloska";
  38. 04: obiad = "Spaghetti Napoli" if
  39. lubizdrowo="tak",
  40. wege="tak",
  41. glutenlaktoza="Nie toleruje laktozy, ale toleruje gluten",
  42. kuchnia = "Wloska";
  43. 05: obiad = "Risotto z pieczarkami" if
  44. kuchnia="Wloska";
  45. 06: obiad= "Sushi" if
  46. czystudent="nie",
  47. lubizdrowo="tak",
  48. (wege="tak" | wege="nie"),
  49. kuchnia="Japonska";
  50. 07: obiad = "Ramen" if
  51. (glutenlaktoza="Toleruje gluten i laktoze" | glutenlaktoza="Nie toleruje laktozy, ale toleruje gluten"),
  52. kuchnia="Japonska";
  53. 08: obiad = "Pierogi ruskie" if
  54. glutenlaktoza="Toleruje gluten i laktoze",
  55. kuchnia="Polska";
  56. 09: obiad = "Bigos" if
  57. lubizdrowo="nie",
  58. wege="nie",
  59. kuchnia="Polska";
  60. 10: obiad = "Pomidorowa" if
  61. lubizdrowo="tak",
  62. kuchnia="Polska";
  63.  
  64.  
  65. end;
  66. control
  67. run;
  68. char S1,S2,S3;
  69. S1:="Wybor obiadu";
  70. S2:="System wspomagajacy wybor obiadu";
  71. S2:="Patryk Bozek i Mateusz Kukula";
  72. vignette( S1,S2,S3 );
  73. setAppWinTitle("Doradca ds. Obiadu");
  74. addSolution(yes);
  75. int Odp;
  76. Odp:=1;
  77. menu "Menu"
  78. 1. "Wybor obiadu"
  79. 2. "Exit"
  80. case 1:
  81. while(Odp==1)
  82. begin
  83. goal("obiad=Obiad");
  84. confirmBox(0,0,"Kontynuuj","Chcesz wybrac ponownie?",Odp);
  85. delNewFacts;
  86. end;
  87. case 2:
  88. exit;
  89. end;
  90. end;
  91. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement