a = int ( input( "Enter the coefficients of a: " ) )
b = int ( input( "Enter the coefficients of b: " ) )
c = int ( input( "Enter the coefficients of c: " ) )
d = b** 2 - 4 * a* c # discriminant
if d < 0 :
print ( "This equation has no real solution" )
elif d == 0 :
x = ( - b+ math.sqrt ( b** 2 - 4 * a* c) ) / 2 * a
print ( ( "This equation has one solutions: " ) , x)
#add the extra ( ) above or it does not show the answer just the text.
else :
x1 = ( - b+ math.sqrt ( ( b** 2 ) - ( 4 * ( a* c) ) ) ) / ( 2 * a)
x2 = ( - b- math.sqrt ( ( b** 2 ) - ( 4 * ( a* c) ) ) ) / ( 2 * a)
print ( "This equation has two solutions: " , x1, " or" , x2)
YSA9IGludChpbnB1dCgiRW50ZXIgdGhlIGNvZWZmaWNpZW50cyBvZiBhOiAiKSkKYiA9IGludChpbnB1dCgiRW50ZXIgdGhlIGNvZWZmaWNpZW50cyBvZiBiOiAiKSkKYyA9IGludChpbnB1dCgiRW50ZXIgdGhlIGNvZWZmaWNpZW50cyBvZiBjOiAiKSkKCmQgPSBiKioyLTQqYSpjICMgZGlzY3JpbWluYW50CgppZiBkIDwgMDoKICAgIHByaW50ICgiVGhpcyBlcXVhdGlvbiBoYXMgbm8gcmVhbCBzb2x1dGlvbiIpCmVsaWYgZCA9PSAwOgogICAgeCA9ICgtYittYXRoLnNxcnQoYioqMi00KmEqYykpLzIqYQogICAgcHJpbnQgKCgiVGhpcyBlcXVhdGlvbiBoYXMgb25lIHNvbHV0aW9uczogIiksIHgpCiNhZGQgdGhlIGV4dHJhICgpIGFib3ZlIG9yIGl0IGRvZXMgbm90IHNob3cgdGhlIGFuc3dlciBqdXN0IHRoZSB0ZXh0LgplbHNlOgogICAgeDEgPSAoLWIrbWF0aC5zcXJ0KChiKioyKS0oNCooYSpjKSkpKS8oMiphKQogICAgeDIgPSAoLWItbWF0aC5zcXJ0KChiKioyKS0oNCooYSpjKSkpKS8oMiphKQogICAgcHJpbnQgKCJUaGlzIGVxdWF0aW9uIGhhcyB0d28gc29sdXRpb25zOiAiLCB4MSwgIiBvciIsIHgyKQ==
compilation info
Main.java:1: error: class, interface, or enum expected
a = int(input("Enter the coefficients of a: "))
^
Main.java:5: error: illegal character: '#'
d = b**2-4*a*c # discriminant
^
Main.java:12: error: illegal character: '#'
#add the extra () above or it does not show the answer just the text.
^
3 errors
stdout