The Question was asked during the technical interview round. You have to format the repeating value in 1/N as given below
N = 8 1/8 = 0.125 Output = 0.125 5 N = 10 1/10 = 0.10 0