Hey, i'm a newbie to the programming scene (1st year uni) and i need some help...

I have an assignment that requires me to write a c program that solves the roots of a cubic polynomial of the form

y(cubed) + py(squared) + qy + r = 0

So far i have been able to write the program so that it can solve for the solution where there are three real root, of which at least two are equal.... but i'm having trouble with the other solutions

I would REALLY appreciate it if anyone could reffer me to somewhere i could get an example of a similar program or could give me some advice...