Test case failed

my answer is correct than why it is not passing??
problem - https://hack.codingblocks.com/contests/c/255/50
solution - https://ide.codingblocks.com/s/39932

Hey your code is right, but the output should be exactly of the format as mentioned in the problem.

it is mentioned in question that
you need to print the nature of the roots (real and distinct , real and equal , imaginary)

Take care of proper format, even an extra full stop is not allowed

https://ide.codingblocks.com/s/39952

You can view my code for reference.

ty bhaia…
here i am having one more doubt… in this one of my test case showing no output … please help to find out where did i go wrong.
my code - https://ide.codingblocks.com/s/39954
problem question - https://hack.codingblocks.com/contests/c/255/67

Hey Kushal, your code is not giving any output if input is 0. So, just think what you should do if input is 0 so that output will be 5.

i figured that if the first digit is 0 it is not giving input according to my code… but i am not able to think to counter this problem… please help me to find the correct solution

Hey Kushal, the hint is remove that if check (i.e line no. 7) in your code there is no need of that and you can use “do while loop” instead of “while loop” so that if your input is 0 then also the code will run once and replace the first zero with one.

https://ide.codingblocks.com/s/40205
nope now also if the first digit is 0 then it is not taking any input … for exmple if i gave 001 as input it will give only 1 as output. i hope i have to change the terminating condition(n>0) but what could be its possible alternative?

Hey Kaushal, your code is working fine according to the requirement of the problem, just remove line 10 of your code that you have shared latest.