+ 2
Please help me. I don't know where the bugs are coming from.
I am a beginner in Javascript programming and this is my first project. I don't know where the bugs are coming from. I would be very grateful if you can help me figure out any, even if it is just one. I have explained the logic I used in the code as a comment at the beginning of the main JavaScript function and I have also listed the bugs I have detected so far at the end of the code. I depended solely on my logic based on previous exercises I have done to write this code, so I am hoping to learn a lot from your corrections. Thank you. https://code.sololearn.com/WTyYeh7Y6lJY/?ref=app
2 Antworten
+ 5
Although I can't debug your code as js is not my cup of tea, but looks like you are opting for a much complicated way(middle term splitting) to find the roots of the equation.
Why not use the direct formula.
equation => ax² + bx + c = 0
It's roots are (x - (-b + (b² - 4(ac))½)/(2a))) and (x - (-b - (b² - 4(ac))½)/(2a)))
+ 1
Arsenic I didn't know about this method. I'll use it and give you a feedback. Thanks a lot.