Square root approach (unable to get the logic )


i have mentioned my doubt as comment but i am not getting the logic behind line no. 15 that how will it work? we have not tell this to run according to for loop …??? how ??? please explain the internal working of it as prateek sir explained the rest part in the video.

@Anku47
Will get bacj asap