Professional Documents
Culture Documents
(defrule r8
(AparatDeCafea (monede "Avem 15 banuti")(pret Q))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 40 banuti")(pret ?r))))
(defrule r9
(AparatDeCafea (monede "Avem 20 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 25 banuti")(pret ?r))))
(defrule r10
(AparatDeCafea (monede "Avem 20 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 25 banuti")(pret ?r))))
(defrule r11
(AparatDeCafea (monede "Avem 20 banuti")(pret Q))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 45 banuti")(pret ?r))))
(defrule r12
(AparatDeCafea (monede "Avem 25 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 30 banuti")(pret ?r))))
(defrule r13
(AparatDeCafea (monede "Avem 25 banuti")(pret Q))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 50 banuti")(pret ?r))))
(defrule r14
(AparatDeCafea (monede "Avem 30 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 35 banuti")(pret ?r))))
(defrule r15
(AparatDeCafea (monede "Avem 30 banuti")(pret Q))
=>
(printout t "Succes" crlf))
(defrule r16
(AparatDeCafea (monede "Avem 35 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 40 banuti")(pret ?r))))
(defrule r17
(AparatDeCafea (monede "Avem 35 banuti")(pret Q))
=>
(printout t "Succes" crlf))
(defrule r18
(AparatDeCafea (monede "Avem 40 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 45 banuti")(pret ?r))))
(defrule r19
(AparatDeCafea (monede "Avem 40 banuti")(pret Q))
=>
(printout t "Succes" crlf))
(defrule r20
(AparatDeCafea (monede "Avem 45 banuti")(pret N))
=>
(printout t "Introduceti banuti (N/Q)" crlf)
(bind ?r (read))
(assert(AparatDeCafea(monede "Avem 50 banuti")(pret ?r))))
(defrule r21
(AparatDeCafea (monede "Avem 45 banuti")(pret Q))
=>
(printout t "Succes" crlf))
(defrule r22
(AparatDeCafea (monede "Avem 50 banuti")(pret Q))
=>
(printout t "Succes" crlf))
(defrule r23
(AparatDeCafea (monede "Avem 50 banuti")(pret N))
=>
(printout t "Succes" crlf))
(run)