Write a Pascal program to solve a quadratic equation. Coefficients a, b and c are entered from the keyboard.

Write a Pascal program to solve a quadratic equation. Coefficients a, b and c are entered from the keyboard. The screen displays information about the value of the roots of the quadratic equation.

Program kvadratnoe_yravnenie;
Uses CRT;
Var a, b, c, d, d1, x1, x2: real;
Begin
CLRSCR;
Writeln (‘enter the first factor a =’);
Readln (a);
Writeln (‘enter the second factor b =’);
Readln (b);
Writeln (‘enter the third factor c =’);
Readln (c);
d: = sqr (b) -4 * a * c;
if d> = 0 then
begin
d1: = sqrt (d);
x1: = (- b + d1) / 2 * a;
x1: = (- b-d1) / 2 * a;
writeln (‘x1 =’, x1: 5: 2);
writeln (‘x2 =’, x2: 5: 2);
end;
else
begin
writeln (‘the equation has no real roots’);
end;
repeat until keypressed;
END.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.