1. a = 10; b = 5; not (a < 5) -> not (5 < 5) -> not false -> true -> a = 5 ответ: 5
2. a = 10; b = 5; (a > 5) and (a < b) -> (10 > 5) and (10 < 5) -> true and false -> false ответ: 10
3. a = 10; b = 5; (a > 1) or (a < b) -> (10 > 1) or (10 < 5) -> true or false -> true -> a = a-5 = 10-5 = 5 (a > 1) and (a = b) -> (5 > 1) and (5 = 5) -> true and true -> true -> a = a-5 = 5-5 = 0 ответ: 0
4. a = 10; b = 5; (a > 1) and (a < b) -> (10 > 1) and (10 < 5) -> true and false -> false (a > 1) and (a = b) -> (10 > 1) and (10 = 5) -> true and false -> false ответ: 10
5. a := 10; b := 5; (a > 1) and (a < b) -> (10 > 1) and (10 < 5) -> true and false -> false -> a = a + 7 = 10+7 = 17 ответ: and
6. a = 10; b := 5; (a < 1) or (a > b) -> (10 < 1) or (10 > 5) -> a = a-7 = 10-7 = 3 ответ: or
7. a = 10; b = 5; (a < 1) and (a > b) -> (10 < 1) and (10 > 5) -> false and true -> false -> a = a + 5 = 10+5 = 15 ответ: and
not (a < 5) -> not (5 < 5) -> not false -> true -> a = 5
ответ: 5
2. a = 10; b = 5;
(a > 5) and (a < b) -> (10 > 5) and (10 < 5) -> true and false -> false
ответ: 10
3. a = 10; b = 5;
(a > 1) or (a < b) -> (10 > 1) or (10 < 5) -> true or false -> true -> a = a-5 = 10-5 = 5
(a > 1) and (a = b) -> (5 > 1) and (5 = 5) -> true and true -> true -> a = a-5 = 5-5 = 0
ответ: 0
4. a = 10; b = 5;
(a > 1) and (a < b) -> (10 > 1) and (10 < 5) -> true and false -> false
(a > 1) and (a = b) -> (10 > 1) and (10 = 5) -> true and false -> false
ответ: 10
5. a := 10; b := 5;
(a > 1) and (a < b) -> (10 > 1) and (10 < 5) -> true and false -> false -> a = a + 7 = 10+7 = 17
ответ: and
6. a = 10; b := 5;
(a < 1) or (a > b) -> (10 < 1) or (10 > 5) -> a = a-7 = 10-7 = 3
ответ: or
7. a = 10; b = 5;
(a < 1) and (a > b) -> (10 < 1) and (10 > 5) -> false and true -> false -> a = a + 5 = 10+5 = 15
ответ: and
19 (10cc)=2^4+2^1+2^0=10011 (2cc)
используя формулу А→В =¬А+В приводим данную формулу в условии к виду:
(X&25=0)+(X&19≠0) + (Х&A≠0)=1
рассмотрим случай, когда
(Х&25 =0) +(X&19≠0) =0 и (Х&A≠0)=1
так как 25 = 11001, то (X&25=0) = 0 (т.е. конъюнкция будет "ложь")
при Х={1; 1000; 1001; 10000; 10001; 11000; 11001}
так как 19=10011, то (Х&19≠0) = 0 при
X={100; 1000; 1100}
общее значение : Х=1000 (2сс) = 8 (10сс)
ответ 8