Doubt in for loop

how can we remove the statement ans = ans - inc; in the code and what is the use of this statement here when we doing precision part of the number.

can we use do while loop or for loop instead of while loop here.

reply me soon.

hello @sid_kapoor in which question you have doubt ?
and which line you are talking about in the code ?
please elaborate so that i can help you in the better way .

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.