declare @a int,@b int,@c int,@x float,@x1 float,@d int
select @a=2,@b=4,@c=2
set @d=(@b*@b-4*@a*@c)
if @d=0
set @x=-@b/2*@a
set @x1=-@b/2*@a
select @x,@x1 as '3*x*x+5*x+4=0的解'
if @d<0
print '无解'
else
set @x=(-1*@b+sqrt(@d))/(2*@a)
set @x1=(-1*@b-sqrt(@d))/(2*@a)
--select @x,@x1 as '3*x*x+5*x+4=0的解'
print @x
print @x1
select @a=2,@b=4,@c=2
set @d=(@b*@b-4*@a*@c)
if @d=0
set @x=-@b/2*@a
set @x1=-@b/2*@a
select @x,@x1 as '3*x*x+5*x+4=0的解'
if @d<0
print '无解'
else
set @x=(-1*@b+sqrt(@d))/(2*@a)
set @x1=(-1*@b-sqrt(@d))/(2*@a)
--select @x,@x1 as '3*x*x+5*x+4=0的解'
print @x
print @x1