dim a,b,c,d as doubleINPUT "The first factor a=" ; aINPUT "The second factor b="; bINPUT "The const c=";cif a=0 then print "Error" endend ifendd=b^2-4*a*cif d>=0 then print "the first root is: "; (-b+sqr(d))/(2*a) print "the second root is:"; (-b-sqr(d))/(2*a)else print "the first root is:"; -b/(2*a); print "+i("; print sqr(-d)/(2*a); print ")" print "the second root is:"; -b/(2*a); print "-i("; print sqr(-d)/(2*a); print ")"end ifend
32119046 [ 2 楼 ]
2006-03-10 00:06:00
谢谢了 爱死你
32119046 [ 3 楼 ]
2006-03-10 00:17:00
专业人士 这种命令print "the first root is "The first factor a=" ; a "The second factor b="; b"The const c=";c "+i("; print ")"不用还有解法吗?