<p>Let m be the length of the period, and let n/p= <br />0.a1a2. . . am(line above a1a2...am i.e recurring). Then ,10^m.n/p=a1a2. . . am.a1a2. . . am(recurring)⇒(10^m−1)n/p=a1a2. . . am,an integer. Since n and p are relatively prime,p must divide 10^m − 1, so d divides m. Conversely,p divides 10^d−1, so (10^d−1)n/p is an integer, with at most d digits. If we divide this integer by 10^d−1, then we obtain a rational number, whose decimal expansion has period at most d. Therefore,m=d.</p>