Hello,
To start with, when you declare variables, initialize them right away:
double a = b = c = disc = x1 = x2 = 0.0;
Next, you will need to use cin or scanf to read the data into variables.
You will also need to check your operator precidence. Example:
4 * 3 / 4 + 6 = 9
4 * 3 / (4 + 6) = 4 * 3 / 10 = 1.2
Your disc equation will need help.
Let us know how it works.
Christian
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
Offline 1,629 posts
since Mar 2004