I have run the code at that time it show “success” but when I submit the code it fails in all test cases.
Fail in testcases of Quadratic Equation
hey @Ajitverma1503, you have used wrong formula for calculating D. Moreover when D=0, you should do y=x instaed of x=y. When D<0, there is no need to print root, just print imaginary.When roots are real and distinct, you have to print smaller root first.
I have made changes to your code, you can check them here https://ide.codingblocks.com/s/103128
1 Like
hey @Ajitverma1503 , if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved