Failing in some test cases
your mistakes
1)printing error not print type of root correctly
2) wrong formulas are used
check the Modified code
i hope this helps
if yes hit a like and donβt forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask
we had to include the header file
what is wrong with (x)^0.5 is it not same as sqrt(x)
header file is for sqrt() function
2^3=1 not 8
because ^ is xor operator in c++ not power
i hope you understand now
1 Like
yes sir clear now
thanks a lot sir