home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p067 / 2.img / HD / HDD86.LSP < prev    next >
Encoding:
Text File  |  1994-01-31  |  3.7 KB  |  125 lines

  1. (defun hdd86()
  2. (SETVAR "CMDECHO" 0)
  3. (setq l (open "hu8.tst" "r"))
  4. (read-line l)
  5. (setq a1 (read (read-line l)))
  6. (close l)
  7. (cond ((= a1 "2") (yj22))
  8.       ((= a1 "4") (yj24))
  9. )
  10. )
  11. (defun yj22()
  12.        (setq f "g")
  13.        (setq f1 0)
  14.        (while (and (/= f "s22") (/= f "S22"))
  15.               (setq f1 (getint "\nenter select of calculat <1-5>: "))
  16.               (cond ((= f1 1) (yj221))
  17.                     ((= f1 2) (yj222))
  18.                     ((= f1 3) (yj223))
  19.                     ((= f1 4) (yj224))
  20.                     ((= f1 5) (yj225))
  21.               )
  22.               (setq f (getstring "\ncontinue <c> or stop <s22>: "))
  23.        )
  24. (check 'hdd85 "hdd85")
  25. )
  26. (defun yj221()
  27.        (setq r0 (getreal "\nr0= "))
  28.        (setq n1 (getreal "\ncosfi= "))
  29.        (setq x01 (getreal "\nx01= "))
  30.        (setq n2 (getreal "\nsinfi= "))
  31.        (setq ue (getreal "\nue= "))
  32.        (setq il (getreal "\nil= "))
  33.        (setq n3 (+ (* r0 n1) (* x01 n2)))
  34.        (setq drtu% (/ (* 2 (* n3 il)) (* ue 10)))
  35.        (setq n50 drtu%)
  36.        (setq q "drtu%= ")
  37.        (setq drt (strcat q (rtos drtu% 2 4)))
  38.        (print drt)
  39. )
  40. (defun yj222()
  41.        (setq g (getstring "\nyj221 valution?<y/n>: "))
  42.        (cond ((or (= g "y") (= g "Y")) (yj221))
  43.        )
  44.              (setq n (getint "enter the number of calculat: "))
  45.               (setq n51 0)
  46.               (setq n51 (* drtu% n))
  47.               (setq q "drtu%= ")
  48.               (setq drtu% (strcat q (rtos n51 2 4)))
  49.               (print drtu%)
  50. )
  51. (defun yj223()
  52.        (setq r0 (getreal "\nr0= "))
  53.        (setq x01 (getreal "\nx01= "))
  54.        (setq fgfi (getreal "\nfgfi= "))
  55.        (setq pl (getreal "\npl= "))
  56.        (setq ue (getreal "\nue= "))
  57.        (setq drtu% (/ (* (* 2 (+ r0 (* x01 fgfi))) pl) (* (* ue ue) 10)))
  58.        (setq n50 drtu%)
  59.        (setq q "drtu%= ")
  60.        (setq drtu% (strcat q (rtos drtu% 2 4)))
  61.        (print drtu%)
  62. )
  63. (defun yj224()
  64.        (setq g1 (getstring "\nyj223 valution?<y/n>: "))
  65.        (cond ((or (= g1 "y") (= g1 "Y")) (yj223))
  66.        )
  67.              (setq n (getint "enter the number of calculat: "))
  68.              (setq n51 0)
  69.                     (setq n51 (* n50 n))
  70.              (setq q "drtu%= ")
  71.              (setq drtu% (strcat q (rtos n51 2 4)))
  72.              (print drtu%)
  73. )
  74. (defun yj225()
  75.        (setq r0 (getreal "\nr0= "))
  76.        (setq pl (getreal "\npl= "))
  77.        (setq ue (getreal "\nue= "))
  78.        (setq n1 (/ (* 2 r0) (* 10 (* ue ue))))
  79.        (setq n51 0)
  80.        (setq n (getint "enter number of valution: "))
  81.               (setq n51 (* n50 pl n))
  82.               (setq drtu% (* n1 n51 n))
  83.         (setq q "drtu%= ")
  84.         (setq drtu% (strcat q (rtos drtu% 2 4)))
  85.        (print drtu%)
  86. )
  87. (defun yj24()
  88.        (setq k "h")
  89.        (setq k1 0)
  90.        (while (and (/= k "s24") (/= k "S24"))
  91.               (setq k1 (getint "enter select of calculat <1-3>: "))
  92.               (cond ((= k1 1) (yj241))
  93.                     ((= k1 2) (yj242))
  94.                     ((= k1 3) (yj243))
  95.               )
  96.               (setq k (getstring "\ncontinue <c> or stop <s24>: "))
  97.        )
  98. (check 'hdd85 "hdd85")
  99. )
  100. (defun yj241()
  101.        (yj222)
  102.        (setq drtu% (* 2 n50))
  103.        (setq q "drtu%= ")
  104.        (setq drtu% (strcat q (rtos drtu% 2 4)))
  105.        (print drtu%)
  106. )
  107. (defun yj242()
  108.        (yj223)
  109.        (setq drtu% (* 6 n50))
  110.        (setq q "drtu%= ")
  111.        (setq drtu% (strcat q (rtos drtu% 2 4)))
  112.        (print drtu%)
  113. )
  114. (defun yj243()
  115.        (setq p (getreal "\np= "))
  116.        (setq l (getreal "\nl= "))
  117.        (setq c (getreal "\nc= "))
  118.        (setq s (getreal "\ns= "))
  119.        (setq drtu% (/ (* p l) (* c s)))
  120.         (setq q "drtu%= ")
  121.         (setq drtu% (strcat q (rtos drtu% 2 4)))
  122.        (print drtu%)
  123. )
  124. (hdd86)
  125.