Question: Write code to calculate roots of a quadratic equation. Write a class QuadraticRoots with main method. The method receives three arguments, write code to parse
Write code to calculate roots of a quadratic equation.
Write a class QuadraticRoots with main method. The method receives three arguments, write code to parse them into double type
For example:
if the values are passed as arguments, then the output should be First root is: Second root is:
If the values are passed then the output should be Roots are imaginary Similarly, if the values are passed then the output should be Roots are equal and value is:
Note: Make sure to use the print and not the printin method.
Note: Please don't change the package name.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
