0
Help please java
ax^2+bx+c=0
2 ответов
+ 4
please do show some effort in writing a code for it, that's the only way you will learn to code and solve problems too, make some effort and mistakes we are for you to help you out when you get stuck
0
Well you can solve quadratic equations using the formula: -b +- the square root of b^2 - 4(a)(c) all over 2(a). Quadratic equations have two possible answers, typically a positive and a negative (+- in the formula) so you’d need two variables for each output, for the first you would replace the +- in the formula with just + and for the second you would replace it with a -
So essentially you’d need to write a program that mimics the quadration equation, using input to assign a, b and c or a statement that retrieves abc from the equation, while making sure it is first set to 0
here I just found this: https://www.programiz.com/java-programming/examples/quadratic-roots-equation