For bracket in this problem

Please explain how the for bracket works in this case with respect to the task to be done

hello @crunchybanana
i didnt get ur doubt. pls elaborate a bit

In this specific problem, I understood the brute force approach to find the square root. But how do we write it in code form? Please explain the " for(int times=0; times<=P; times++)" part of the code

this is a loop that is running for P+1 Times .
we are running this loop becuase we want square root upto p digit precision.
in each iteration we are finding best value for a paricular position .repeating for p positions will give p digit precision

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.