Site <title> Solving the solution of the two quadratic equation </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body bgcolor= "#FFFFFF" >
<div align= "center" ><font color= "#FF0000" ><b> find out the solution of the two-time equation </b></font><b></b> </div>
<%
If Request.Form ("cal") = "Y" Then
A=trim (Request ("a"))
B=trim (Request ("B"))
C=trim (Request ("C"))
Mynum=b*b-4*a*c
%>
The equation you entered is:<%=a%>x<sup>2</sup>+<%=b%>x+<%=c%>=0<br>
<%
If A=0 then%>
This is not a two-time equation,
<%if b=0 then%>
You have entered a formula such as 0x<sup>2</sup>+0x+<%=c%>=0! <br>
<%if c=0 then%>
There are infinitely many solutions.
<%else%>
<font color=red> condition is not tenable! </font>
<%end if%>
<%else%>
Its solution is: x=<%=-(c/b)%><br>
<%end if%>
<%elseif mynum=0 then%>
It has two equal real roots. x=<%=-b/(2*a)%><br>
<%elseif mynum>0 then%>
It has two unequal real roots. <br>
X1=<%=formatnumber ((-B+SQR (Mynum))/(2*a),,-1)%><br>
X2=<%=formatnumber ((-B-SQR (Mynum))/(2*a),,-1)%><br>
<%else
Realpart=formatnumber (-b/(2*a), 4,-1)
Imagpart=formatnumber (SQR (-mynum)/(2*a), 4,-1)
%>
This equation has two complex roots:<br>
<%=realpart%>+<%=imagpart%>i<br>
<%=realpart%>-<%=imagpart%>i<br>
<%
End If
End If
%>
<form method= "POST" action= "try3.asp" >
Input equation Parameters:
<input type= "text" Name= "a" size= "5" >
x<sup>2</sup>+
<input type= "text" name= "B" size= "5" >
x+
<input type= "text" Name= "C" size= "5" >
=0
<input Type=hidden name=cal value=y>
<input type= "Submit" name= "Submission" value= "submitted" >
</form>
</body>