;;由误差求中误差
(defun c:jS(/ a m b aa)
(setq a 0 m T b 0 AA 0)
(while m
(setq m(getreal "\输入:<空回车结束>"))
(if m
(progn
(setq a(+ a (* m m)))
(SETQ AA(+ AA M))
(setq b(1+ b))
)
)
)
(setq pj(/ aa b))
(setq x(sqrt (/ a (- b 1))))
(alert (strcat "均差为:" (rtos pj 2 2) "\n中误差为:" (rtos x 2 2)))
)