Unformatted text preview: << endl << endl else if (Discrim > 0) { cout << "\nThe two real solutions are:\t x = " << (B + sqrt(B * B  4 * A * C)) / (2 * A) << "\n and:\t x = " << (B  sqrt(B * B  4 * A * C)) / (2 * A) << endl << endl return 0 } else if (Discrim == 0) { cout << "\nThe one real solutions is:\t x = " << B / (2 * A) << endl << endl return 0 } else if (Discrim < 0) { cout << "\nThe two imaginary solutions are:\t" << B / (2 * A) << " + " << (sqrt((B * B  4 * A * C))) / (2 * A) << " * i" << "\n and:\t" << B / (2 * A) << "  " << (sqrt((B * B  4 * A * C))) / (2 * A) << " * i" << endl << endl return 0 } }...
View
Full Document
 Spring '07
 Ghyam
 Computer Programming

Click to edit the document details