0

I have a math C++ program that needs some help.

a program that can solve many sets of quadratic equations. The program will ask users whether they want to solve another equation. The user decides to continue by entering 1 or to terminate by entering 0 or any other number. The program will ask the user to input the a, b and c, and then will display: 1) if b2- 4ac > 0There are two different solutions to this equation. These solutions are: x1 = -b+sqrtb^2-4ac x2=-b-sqrtb^2-4ac 2) if b2- 4ac < 0 There is no real solution to this equation. However, this equation has imaginary solutions that one can find. 3) if b2 - 4ac = 0 This equation has one solution, which can be found by setting b2- 4ac to 0in the first case. Thus, we may assume that both roots are the same and equal to -b/2a. So, you may combine (1) and (3) in one. I have done coding based on an algorithm and my flowchart to code but not sure what else to do and what needs to fixed to do what the instructions are describing. https://code.sololearn.com/cA87a18A12a2/#cpp

22nd Feb 2021, 12:08 AM
Carlye
4 odpowiedzi
+ 2
https://code.sololearn.com/c0jbUTT9mKAI/?ref=app here's the fixed code I have put comments to highlight the changes made.
22nd Feb 2021, 12:37 AM
Hima
Hima - avatar
+ 1
Thanks, that really helped. I see now what I did and fixed the mistakes!
22nd Feb 2021, 1:30 AM
Carlye
+ 1
Hima already gave you a great answer, but maybe you should read the answer I gave to this other question (it's a bit long and I'm too lazy to rewrite it...) https://www.sololearn.com/Discuss/2679631/?ref=app
22nd Feb 2021, 1:08 PM
Angelo
Angelo - avatar
0
Angelo You shouldn't be doing the big labour cause these things are already there , you should be writing something which is not there :P
22nd Feb 2021, 2:25 PM
Hima
Hima - avatar