Become familiar with control structures
Become familiar with arithmetic in C++
Become familiar with OOP in C++
Create a program that calculates and displays solutions to a quadratic equation.
A quadratic equation can be generalized by equation below:
Closed form solutions can be found for the zeros of a quadratic function conveniently. That is the locations (x) where the function is equal to zero can be found by the following equation:
Note that depending on the sign of the expression under the square root, your system (problem) may have complex solutions. Therefore your program should be able to produce real number, or complex number solutions.
Should prompt the user to choose between quiting, or solving another problem. ASCII character “q” should denote quiting of the session, and “s” should denote solving another problem
If “q” is depressed, the program to terminate execution
If “s” is depressed, the program should proceed to obtain the three values a, b, and c that are needed to define a quadratic equation. After this step, your program should produce the two correct solutions.
If your program receives any other input, it should display the choices until one of “q” or “s” is produced
Since it is possible to have complex numbers as your solutions, your program should be prepared to calculate and display the complex numbers
Your program should be properly commented
Your program should require no math or additional libraries and should only declare the available primitive types
Subject | Computer |
Due By (Pacific Time) | 09/05/2015 01:00 pm |
Tutor | Rating |
---|---|
pallavi Chat Now! |
out of 1971 reviews More.. |
amosmm Chat Now! |
out of 766 reviews More.. |
PhyzKyd Chat Now! |
out of 1164 reviews More.. |
rajdeep77 Chat Now! |
out of 721 reviews More.. |
sctys Chat Now! |
out of 1600 reviews More.. |
sharadgreen Chat Now! |
out of 770 reviews More.. |
topnotcher Chat Now! |
out of 766 reviews More.. |
XXXIAO Chat Now! |
out of 680 reviews More.. |