;;; Roy Smith ;;; Unequal Flat Plat Calculator ;;; (defun C:UFP () (setq side1 (getreal "\nDimension of side 1? ")) (setq side2 (getreal "\nDimension of side 2? ")) (setq ans1 (+ side1 side2)) (setq ans2 (/ ans1 2)) (setq L1 (getreal "\nLength of plate? ")) (setq ans3 (* ans2 L1)) (setq ans4 (getreal "\nThickness of plate? ")) (setq ans5 (* ans4 ans3)) (setq ans6 (* ans5 0.00000785)) (setq qty (getreal "\nQuantity? " )) (if (= qty nil) (setq qty 1)) (setq ans7 (* ans6 qty)) (SETQ wstrng (rtos ans7)) (princ (strcat "\nWeight = " wstrng)) (princ " kg") (princ) ) ;;; end ;;;