Предмет: Информатика, автор: Pasha95me

Вычислить значения логических выражений:
а) xx or (y mod 2=0) and x при x=false y=14
Б) Not n or not b and b при n=true b=false

В) (c+d<>0) and (c0) при c=3 d=-5

Ответы

Автор ответа: allangarsk
0
var f1,f2,f3,x,n,b:boolean; y,c,d:integer;
begin
x:=false; y:=14;
F1:= (x and x) or (y mod 2=0) and x ;
n:=true; b:=false;
F2:= Not(n) or not(b) and b;
 c:=3; d:=-5;
F3:=(c + d <> 0) and (c = 0);  writeln('F1=',F1);writeln('F2=',F2);writeln('F3=',F3);end.
Приложения:

Аноним: 1. Получение решения на компьютере не сопровождается объяснением процесса решения и ничем не отличается от расчета на калькуляторе. 2. В последнем выражении с=0 - это Ваша фантазия, точно так же можно решить, что там с>0, c<0 и т.д.
Автор ответа: Аноним
1
a) \ xx \ or \ (y \ mod \ 2=0) \ and  \ x \ = \ false\cdot false +(0=0)\cdot false= \\ false+frue\cdot false=false+false=false \\ b) \ not \ n \ or \ not \ b \ and \ b \ = \overline{true}+\overline{false}\cdot false=false+false=false \\ c) \ (c+d \neq 0) \ and \ (c0)=(-2 \neq 0)\cdot(c0)=true\cdot(c0)=c0
В последнем примере примере пропущен знак операции между с и 0, поэтому окончательный ответ определяется истинностью выражения
с {операция отношения} 0
Похожие вопросы
Предмет: Английский язык, автор: NeonDove
Срочно нужна помощь с английским.

1) Choose the correct variant FUTURE CONTINUOUS / FUTURE SIMPLE

1. This time tomorrow they (sit) in the train on their way to Chicago.

A will sit B will be sitting

2. I (be) at home if you need anything.

A will be B will being

3. Don't phone Jim from 5 to 6, he (have) English.

A will have B will be having

4. Why are you in a hurry? If you arrive at 8 o'clock, they (still / cook) the meal.

A will still cook B will still be cooking

5. He (come) at eight in the evening.

A will come B will be coming

6.... you (have lunch) with me on Friday?

A Will you have lunch B Will you be having lunch

7. I'm not sure I'll recognize Eve. I haven't seen her for ages. She (wear) a dark blue pullover and jeans.

A will wear B will be wearing

2) Choose the correct variant FUTURE PERFECT / FUTURE SIMPLE

1. Julia (finish) all the housework by three o' clock and we' 11 go for a walk.

A will finish B will have finished

2.1 promise I (get) in touch with you if I need your help.

A will get B will have got

3. We are going to buy a car. By the end of next month our family (save) money for it.

A will save B will have saved

4. The workers say that they (build up) a district by the beginning of 2000.

A will build up B will have built up

5. She (have lunch) by the time we arrive.

A will have B will have had

3) Choose the correct variant FUTURE SIMPLE / FUTURE PERFECT / FUTURE CONTINUOUS

1. He (sleep) when you come back tonight.

A will sleep B will be sleeping

2. By the time I come they (go).

A will go B will have gone

3. - It is snowing heavily. Have you listened to the weather forecast for tomorrow?

-I hope it (stop) snowing by tomorrow morning.

A will stop B will be stopping C will have stopped

4. My sister (know) the result of her exam on economy in three days.

A will know B will have known C will be knowing

5. - Let's meet at the station at 5 o'clock.

- O.K. I (wait) for you there.

A will wait B will be waiting C will have waited