if the prime factorization of the denominator contains all 2's, all 5's, or a combination of 2's and 5's only, then the decimal expansion of the fraction will be terminating; also if the denominator is a power of ten to begin with, you don't have to factor, the decimal expansion will be terminating
for example, 3/10=0.3, 37/100=0.37, 528/1000=0.528, 345/10,000=0.0345, and so on