lol neither eggs or bacon actually
This may be a more intuitive approach to follow:
- (defun c:test (/ tot choice egg bac ExitFlag) (setq tot 0) (while (not ExitFlag) (initget "Checkout Eggs Bacon") (setq choice (getkword "\nWhat you wanna do? [Checkout/Eggs/Bacon] : ")) (cond ( (or (eq "Checkout" choice) (not choice)) (princ (strcat "\nTotal = £" (itoa tot))) (setq ExitFlag t)) ( (eq "Eggs" choice) (if (setq egg (getint "\nHow Many Eggs do you want? : ")) (setq tot (+ tot (* 2 egg))))) (t (if (setq bac (getint "\nHow Many rashers of Bacon? : ")) (setq tot (+ tot (* 3 bac))))))) (princ))
|