When trying to write a code for a quadratic equation to figure out the x's, I get an error saying there is a problem with the parenthesis Here's the code i have entered for this calculator
puts "A"
a = gets.to_f
puts "B"
b = gets.to_f
puts "C"
c = gets.to_f
d = (-b+ ((b**2 - 4ac)**1/2))/2a
f = (-b- ((b**2 - 4ac)**1/2))/2a
puts d
puts f
and i come out with this error when trying to run it
quad.rb:8: syntax error, unexpected tIDENTIFIER, expecting ')'
d = (-b+ ((b**2 - 4ac)**1/2))/2a
^
quad.rb:8: syntax error, unexpected tIDENTIFIER, expecting $end
Any help? Thank you very much