What is wrong in the code

plz check two test cases are not passing

for 99
output should be 90
Try to debug with this