(*Cathy Ngai F.4AS *)
(*the purpose of this program is to find the roos of a qudratic equation*)
program FindRoots (input, output);
uses wincrt;
var A, B :real;
C,D,E ,F:integer;
begin
repeat
writeln('Please enter the coefficient of x square term: ');
readln(C);
writeln('Please enter the coefficient of x term: ');
readln(D);
writeln('Please enter the constant term: ');
readln(E);
E :=D*D-4*C*E;
if F<0 then
writeln(' No real roots!')
else
begin
A :=(-D+SQRT(F))/(2*C);
B :=(-D-SQRT(F))/(2*C);
writeln('The roots are ',A:5:2,' and ', B:5:2)
end.
               (
geocities.com/hk)