Let x =
Multiplying both sides by 1000 (since three digits are repeating), we get
1000x = 1.001001 ....... 1000x = 1 + 0.001001001 ........
1000x = 1 + x
1000x - x = 1
999x = 1
Thus.
Here, p = 1
q = 999