All pastes #747145 Raw Edit

Someone

public text v1 · immutable
·published 2007-10-23 20:02 UTC
rendered paste body
Write a C++ program that will ask the user 3 numbers that represent a, b, and c respectively. These are the quadratic equation: ax^2 + bx + c = 0. Your program will solve the roots to this equation.
	
a) It will tell the user if there are no real roots, if there is only one root it will display that one root once, and 2 distinct roots if they exist.

b) It will tell the user if there are 2 distinct complex roots (g + hi, where i^2 = -1), 2 distinct real roots or 1 repeated root.

use math.h header file and the function sqrt()
*/