Quadratic equations

  1. What’s wrong in this code?
  2. How to insert constraints? like given in this question-100<x<100
  3. What are these test cases?

hi @sikasaha90
ur logic was correct but ur o/p was being printed in the expected format…

  1. while printing real and distinct it should be written as Real and Distinct. r and d capital…
  2. secondly roots should be printed in increasing order…

there were some more minor mistakes like this… I have corrected ur code… its working fine and passing all test cases…
corrected code -->

hi @sikasaha90
i hope its clear now??

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.