请各位帮忙看一下偶的Pascal程序
实在找不到Pascal专区,就到这里来看谁能够帮忙修改一下(最好是旁批)~~Program Equation(Input,Output);
Var
A,B,C,X,Dr,S:Real; {Y=0}
Q:Char;
{Selection Part};
Writeln('Please input 1 or 2,if you select 1,I can calculate linear equation;and if you select 2,I can calculate quadratic equation.')
Readln(S);
{Linear equation part};
If (X=1) Then Begin
Writeln('Please input A,B');
Readln(A,B);
If (A<>0) then X:=(-B)/A;
Writeln('The result is, X=',X);
Else Writeln('No root!');
{Quadratic equation part};
Else if (X=2) then Begin
Writeln('Please input A,B,C');
Readln(A,B,C);Dr:=B*B-4*A*C;{A*X*X+B*X+C=0};
If (A<>0) then begin
If (Dr>0) then writeln('X1=',X:=(-B+Sqrt(Dr))/2*A);
writeln('X2=',X:=(-B-Sqrt(Dr))/2*A);
If (Dr=0) then writeln('X1=X2=',X:=(-B)/2*A);
If (Dr<0) then writeln('No root!');
Else writeln(No root!);
Writeln('Well done!');
Write('Please input Quit so that you can quit this program.');
Readln(Q);
If (Q=Quit) Then writeln('Thank you for using');writeln('*****************************');
End.