Suppose A/B equals a decimal fraction F, which has d digits after the decimal place and then terminates.Then (A/B)*10D = F*10D is an integer.That is A*10D/B is an integer.A and B are coprime so they have no factor in common and therefore B must divide 10D.