Why this is giving wrong output

where do u face the issue

i ran the code it gives correct answer

please sit particular i/p where u felt the program malfunctioned

check for 100000 precision 9

multiplying mid* mid gets out of range
so do mult == (n/mult)
and in the following line
mult < (n/mid)