Var a,b,c,D,x1,x2,p,q:Real; Begin Repeat Write('a= '); Readln(a); if a=0 then writeln('Error: a=0. Enter another value'); Until a<>0; Write('b= '); Readln(b); Write('c= '); Readln(c); p:=b/a; q:=c/a; D:=Sqr(p/2)-q; If D>0 then begin Writeln('x1 = ',-p/2-Sqrt(D):0:5); Writeln('x2 = ',-p/2+Sqrt(D):0:5); end else If D=0 then Writeln('x1 = x2 = ',-p/2:0:5) else begin Writeln('x1 = ',-p/2:0:5,'-i*',Sqrt(-D):0:5); Writeln('x2 = ',-p/2:0:5,'+i*',Sqrt(-D):0:5); end; Readln; End.
1. (A+B+C)&(неA&B&неC)= A&неA&B&неC+B&неA&B&неC+C&неA&B&неC=0+неA&B&неC+0=неA&B&неC
2. (A+B)&(неB+A)&(неC+B)=(A&неB+A&A+B&неB+B&A)&(неC+B)= (A&неB+A+0+B&A)&(неC+B)= (A&неB+A+B&A)&(неC+B)=A&неB&неC+A&неB&B+A&неC+A&B+B&A&неC+B&A*B= A&неB&неC+0+A&неC+B&A&неC+A&B+A&B=A&неB&неC+A&неC+B&A&неC+A&B=A&неC(B+1)+ A&B&(неC+1)=A&неC+A&B= A&(неC+B)
3. (1+(A+B))+((A+C)&1)=1+((A+C)&1)= 1+(A&1+c&1)= 1+A+C=1
4. (A&B&неC)+(A&B&C)+не(A+B)= (A&B&неC)+(A&B&C)+неA&неB= (A&B)&(неC+C)+неA&неB=A&B+неA&неB= A~B
5. (A+B+C)&не(A+неB+C)= (A+B+C)&неA&B&неC=A&неA&B&неC+B&неA&B&неC+C&неA&B&неC=0+неA&B&неC+0=неA&B&неC
Program yravnenie;
Var
a,b,c,D,x1,x2,p,q:Real;
Begin
Repeat
Write('a= ');
Readln(a);
if a=0 then writeln('Error: a=0. Enter another value');
Until a<>0;
Write('b= ');
Readln(b);
Write('c= ');
Readln(c);
p:=b/a;
q:=c/a;
D:=Sqr(p/2)-q;
If D>0 then
begin
Writeln('x1 = ',-p/2-Sqrt(D):0:5);
Writeln('x2 = ',-p/2+Sqrt(D):0:5);
end
else
If D=0 then
Writeln('x1 = x2 = ',-p/2:0:5)
else
begin
Writeln('x1 = ',-p/2:0:5,'-i*',Sqrt(-D):0:5);
Writeln('x2 = ',-p/2:0:5,'+i*',Sqrt(-D):0:5);
end;
Readln;
End.