Precision printing

Getting the wrong answer in two cases…
Qn- https://hack.codingblocks.com/contests/c/452/192
My Code-https://ide.codingblocks.com/#/s/17872

Rakshit check this
https://ide.codingblocks.com/#/s/17909 ,
if any problem reply
Happy coding!

Thanks for the help but can you tell why can’t we use setprecision when the no. is not a perfect square…

if 9 comes its add 1 to the previous and make 9 0 it is its working feature ,

Didn’t knew that … Thanks!!