I have a problem that I need help with. My fiancé was placed in the hospital recently and I missed the entire first two weeks of my C++ programming class. I was given an assignment that has to be completed by tonight, October 3. If anyone could help me out, the help would be appreciated, I am completely lost and getting no where. Just the code would help.

I have to write a program that solves the quadratic using the quadratic formula below. It will generally have 2 solutions; that is, 2 different values of x that make the equation true. It can happen that both solutions are the same number, and it is possible that the solutions will be complex or imaginary numbers.

For the second-order polynomial equation:

ax2 + bx + c = 0

The following solution exists:

x = -b +or- the square root of b2 – 4ac

Once the program has given the answers to the equation, the program should give the user the option of solving for another set of numbers by asking if he or she would like to run the program again. If the user does not want to run the program again, the program should output a message telling the user, “Thank you for using this program.

While I can sympathize with your situation, that still doesn't give you a free lunch card. Instead of coming here and trying to get someone else to do your work for you, go talk to your instructor and work something out. If they're incapable of making extraordinary exceptions then get another instructor.

I understand. I would not be asking unless I really needed it and exhausted all other resources,

This article has been dead for over six months. Start a new discussion instead.