posted 1 year ago
Please explain what the problem is. Post the current output and add some comments saying what is wrong with it.
The code is missing all the nested if statements' indentations. Please update the code and fix the indentations to make the code easier to read and understand.
uses nested if statements
The code is missing all the nested if statements' indentations. Please update the code and fix the indentations to make the code easier to read and understand.
Jesus Rod Valenzuela
Greenhorn
Posts: 9
Norm Radder
Rancher
Posts: 2745
31
Jesus Rod Valenzuela
Greenhorn
Posts: 9
posted 1 year ago
Enter the coefficient of the quadratic term > 9
Enter the coefficient of the linear term > 0
Enter the constant term > 16
For the quadratic equation 9.00000x^2+16.00000=0
Enter the coefficient of the quadratic term > 9
Enter the coefficient of the linear term > 16
Enter the constant term > 0
For the quadratic equation 9.00000x^2+16.00000x=0
something like that
Enter the coefficient of the linear term > 0
Enter the constant term > 16
For the quadratic equation 9.00000x^2+16.00000=0
Enter the coefficient of the quadratic term > 9
Enter the coefficient of the linear term > 16
Enter the constant term > 0
For the quadratic equation 9.00000x^2+16.00000x=0
something like that
Norm Radder
Rancher
Posts: 2745
31
posted 1 year ago
Welcome to the Ranch
Your main method is much too long and is trying to do too many things. Create methods for input and check that they are working. Create a method for solving the equations and check that they are working, separately. But before you do that, write down in very simple words how you are going to solve the equations, because those instructions will be easy to turn into code.
Avoid ^2; use \u00b2 inside your Strings instead.
Your main method is much too long and is trying to do too many things. Create methods for input and check that they are working. Create a method for solving the equations and check that they are working, separately. But before you do that, write down in very simple words how you are going to solve the equations, because those instructions will be easy to turn into code.
Avoid ^2; use \u00b2 inside your Strings instead.
Happiness is not a goal ... it's a byproduct of a life well lived  Eleanor Roosevelt. Tiny ad:
The WEB SERVICES and JAXRS Course
https://coderanch.com/t/690789/WEBSERVICESJAXRS
