io.write("Enter a:") local a = tonumber(io.read()) io.write("Enter b: ") local b = tonumber(io.read()) io.write("Enter c: ") local c = tonumber(io.read()) if a == 0 then print("This is not a quadratic equation") else local d = b^2 - 4*a*c if d < 0 then print("No real solution") elseif d == 0 then local x = -b / (2*a) print("One real solution: x = " .. x) else local x1 = (-b + math.sqrt(d)) / (2*a) local x2 = (-b - math.sqrt(d)) / (2*a) print("Two real solutions: x1 = " .. x1 .."x2 = " .. x2 ) end end