Please specify the required output with more precisely
Regarding Output format
What is not clear like roots are real and distinct, roots are real and equal and roots are imaginary…
and you are supposed to print values of roots when they are real only.