Yeah, I get that. But there are multiple test cases. I can't initialise any of them. Without using "setprecision ()" or "fixed" 5 out of 9 were wrong but I used fixed and it worked. So, thanks a lot.
You should use casting just like this:
As if one of the variables x, y or both of them is float , the result will be float. Even if the two variables were integers the result will either be float.