code link:https://ide.codingblocks.com/s/83899
2 test cases fail
Hi @Rohan_singla
if(a==0) remove that condition there is no need for that,then when you are printing real and distinct,imaginary and all you have to print the first letter of these words as capital,next take the d variable as float and when you are using them to find out the roots r1 and r2 type cast the ans to int.
Share your code here with the changes you have made.
Hi,
see I told you to take the roots in int and not in double secondly first root is -b-sqrt(d)/2a and the second one is b+sqrt(d)/2a and don’t give \t when printing between the roots,use space.
I have made the changes for you,just have a look: