Булевские операции!
Добавлено: 18 ноя 2007, 18:57
http://content.samaradom.ru/inc/%d0%91% ... %d0%bf.jpg
В общем первую задачу написал так!
Program bul_1;
var
x1,x2,x3,X:boolean;
y1,y2,y3:string;
Begin
writeln('x1');
readln(y1);
if y1='true' then x1:=true else x1:=false;
writeln('x2');
readln(y2);
if y2='true' then x2:=true else x2:=false;
writeln('x3');
readln(y3);
if y3='true' then x3:=true else x3:=false;
if (x1 or x3 and not(x2)) and (not(x1) or x2)=(not(x2) and x3)
then X:=true else X:=false;
writeln(' ');
if X=true then writeln('true') else writeln('false');
readln;
end.
Проверти пожалуйста!
Еще вопрос - что означает "string", "clrscr"
И что означает + в кружечке - в Булевских операциях!!??
В общем первую задачу написал так!
Program bul_1;
var
x1,x2,x3,X:boolean;
y1,y2,y3:string;
Begin
writeln('x1');
readln(y1);
if y1='true' then x1:=true else x1:=false;
writeln('x2');
readln(y2);
if y2='true' then x2:=true else x2:=false;
writeln('x3');
readln(y3);
if y3='true' then x3:=true else x3:=false;
if (x1 or x3 and not(x2)) and (not(x1) or x2)=(not(x2) and x3)
then X:=true else X:=false;
writeln(' ');
if X=true then writeln('true') else writeln('false');
readln;
end.
Проверти пожалуйста!
Еще вопрос - что означает "string", "clrscr"
И что означает + в кружечке - в Булевских операциях!!??