What do you want to achieve?
I want to make a script that solves a quadratic equation
What is the issue?
The issue is that my script won’t print any result
a = 12
b = 8
c = 71
d = (b^2) - (4*a*c)
while d >= 0 do -- Checking if the Discriminant is either positive or equal to 0
if d > 0 then do -- if the Discriminant is positive
result1 = (-b + math.sqrt(d) / (2*a))
result2 = (-b - math.sqrt(d) / (2*a))
print(result1)
print(result2)
end
elseif d == 0 then -- else if the Discriminant is equal to 0
result3 = - (b / (2 * a))
print(result3)
end
end
What solutions have you tried so far?
Many but I have not found what is the problem yet. Help would really be really appreciated! Thanks in advance.