in reply to Subtraction by digit

Show the code you tried? What do you mean, "the results are float numbers"? Showing both what you got and what you expected would help people understand you better.