Here's the nasty part. In order for this to work, the square root of the quadratic formula must come back with an integer. In fact sqrt (b^2 - 4ac) comes back with 3635568.29 something. which is not a whole number. Either there is an error in the givens or something, but this question is never going to do what you think it will do.