My second code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

My second code

Check out my program which solves quadratic equations. Any suggestions will be welcome. https://code.sololearn.com/coIDfqBndg0E/?ref=ap UPDATE: Support added for imaginary numbers (beta). Can anyone please check whether it shows the correct answer while working with equations that have complex roots?

1st May 2017, 6:45 AM
Abdullah Omar Nasseef
Abdullah Omar Nasseef - avatar
3 Answers
+ 11
Good but needs work, enter 0 and 0 and 6 , you will get wrong answer, It should print 'for all values of x' or like that. Similarly ,its false for imaginary roots. Heres a proper code, by @Krishna sir :- https://code.sololearn.com/c4vyL0lAVxHa/?ref=app
1st May 2017, 7:41 AM
Meharban Singh
Meharban Singh - avatar
+ 6
note to self: must learn java
1st May 2017, 6:46 AM
jay
jay - avatar
+ 1
UPDATE: Support added for imaginary numbers (beta). Can anyone please check whether it shows the correct answer while working with equations that have complex roots?
1st May 2017, 12:09 PM
Abdullah Omar Nasseef
Abdullah Omar Nasseef - avatar