,,,
1.
2.
3. -
4.
5.
(, , ..) , . - , " " , .
, , . , , , , . . , , , , .
, . , , : , , .
, , . 60-70 ( ), , - , , .
, .
. , , , , . .
.
1.
(. test , , ) , , , , .
1864 . . . 1883 : , , .
"" . 1890 . 50 : (, , , ..)
. : (1891) , , , ..
. . , .
. . .
. 1- 1914-1918 , . .
(, 2- 1939 45 20 ). 20- , 1926 .
(, , ), , .
? , , . , .
: , , , ( ) .
, , ( ), .
, , .
, , , , . , - .
, .
.
:
1) ;
2) ;
3) ;
4) ;
5) .
:
1) ;
2) ;
3) .
.
: " ?".
: 7.
: 2.
: "" (1) 10 , "" (0) 0 , " " (-1) 5 .
1:
: 1 0.
2: , .
: 1 -1.
3: , , , .
: 1 0.
4: , , .
: 1 0.
5: , .
: -1 -1.
6: , - .
: 1 0.
7: , , - .
: 0 0.
.
"", "" " ", .
1 : = 55.
: , . , .
2 : = 10.
: . , , . , , , , ,
2.
.
:
1. "" 10 .
2. " " 5 .
3. .
4. .
5. .
6. .
, . .
, .
3. -
- 1 4.
1 CREATE_LST: X , LST
2 SUM_COUNTER: VALUE , COUNTER ,
3 - CALC_RESULT COUNTER , , I , INPUT_STREAM , MAX_COUNT , MIN_COUNT , PRINT_RES ,
4 PRINT_RES: NUM_PEOPLE , COUNTER , , OUPUT_STREAM , RESULT
4.
; X
(DEFUN CREATE_LST (X LST)
(COND
((EQL X 0) LST)
(T (CREATE_LST (- X 1) (CONS 0 LST)))
)
)
;
(SETQ INPUT_STREAM (OPEN " D:\TEST.TXT" :DIRECTION :INPUT))
;
(SETQ TEMP (READ INPUT_STREAM))
(SETQ NAME_TEST (CAR TEMP))
; 2
(SETQ NUM (CADR TEMP))
;
(SETQ PEOPLE (CADDR TEMP))
;
(SETQ COUNTER 0)
(DEFUN SUM_COUNTER (VALUE COUNTER)
; "" (1) - 10
; " " (-1) - 5
; "" (0) - 0
(COND
((= VALUE 1) (SETF COUNTER (+ COUNTER 10)))
((= VALUE -1) (SETF COUNTER (+ COUNTER 5)))
((= VALUE 0) (SETF COUNTER (+ COUNTER 0)))
)
)
;
(SETQ LST_COUNTER (CREATE_LST PEOPLE NIL))
(DO
((I 0))
((>= I NUM))
; LST
(SETQ LST (READ INPUT_STREAM))
; LST
(SETQ ANSWER (CADR LST))
;
(SETQ LST_COUNTER (MAPCAR 'SUM_COUNTER ANSWER LST_COUNTER))
(SETQ I (+ I 1))
)
; TEST.TXT
(CLOSE INPUT_STREAM)
;
(SETQ NUM_PEOPLE 1)
;
(DEFUN PRINT_RES (RESULT COUNTER)
;
(PRINT (LIST NUM_PEOPLE 'PEOPLE '= 'COUNTER COUNTER) OUTPUT_STREAM)
;
(PRINT RESULT OUTPUT_STREAM)
;
(SETQ NUM_PEOPLE (+ NUM_PEOPLE 1))
)
; CALC_RESULT.TXT
(DEFUN CALC_RESULT (COUNTER)
;
(DECLARE (SPECIAL INPUT_STREAM))
(DECLARE (SPECIAL RES))
(DECLARE (SPECIAL MAX_COUNT))
(DECLARE (SPECIAL MIN_COUNT))
(SETQ INPUT_STREAM (OPEN " D:\CALC_RESULT.TXT" :DIRECTION :INPUT))
(DO
((I 0))
((>= I 3))
;
(SETQ RES (READ INPUT_STREAM))
;
(SETQ MAX_COUNT (CAR (CAR RES)))
(SETQ MIN_COUNT (CADR (CAR RES)))
;
;
(IF (AND (<= COUNTER MAX_COUNT) (>= COUNTER MIN_COUNT))
(PROGN
(PRINT_RES (CADR RES) COUNTER)
(SETQ I 3)
)
)
(SETQ I (+ I 1))
)
;
(CLOSE INPUT_STREAM)
)
; RESULT.TXT
(SETQ OUTPUT_STREAM (OPEN " D:\RESULT.TXT" :DIRECTION :OUTPUT))
;
(PRINT (LIST 'TEST NAME_TEST) OUTPUT_STREAM)
(MAPCAR 'CALC_RESULT LST_COUNTER)
; RESULT.TXT
(TERPRI OUTPUT_STREAM)
(CLOSE OUTPUT_STREAM)
;END
5.
5
6
7
2.
8
9
10
, , .
.
. , .
- .
1. , .. [] / .., ... .: , 2007. 708 .
2. , .. [] / .. .: , 2001. . 467.
3. , .. : . [] / .. , .. M.:, 1999. . 625.
4. , . . [ ] / . .: , 2003. . 318.
5. , .. [] / .., .., ... : , 2002. 160 .
6. , .. Lisp. [ ] / .., .. . .: , 2003. . 79.
7. , .. ? [] / .. .: , 200. . 216.
8. . [] / ., .. .:, 1990. 460 .
1. 2. 3. - 4. 5.
Copyright (c) 2024 Stud-Baza.ru , , , .