I think I am having problem with the imaginary part of the question . When in the que it is said print only the integer part of roots in case of imaginary roots I make D=0. But still I am wrong. Please point out where and why.
Cant understand which test case is failing
Hey @abhinavsehgal802_270a44594b6dc4ad,
Your logic is correct but you missed out a point.
Your problem statement states that
If Imaginary , no need to print the roots.
So the final else block of your code should be:
else
{
System.out.println(“Imaginary”);
}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.