Strictly speaking, if the problem is just "find a number, m, such that 0< m< n+ 11 and m= 7 (mod 12)" then "m= 7" is a perfectly valid answer for all n! Did you mean "such that n< m< n+ 11"?

Any number m, satisfying m= 7 (mod 12) can be written m= 7+ 12k for some integer k. To find such a number such that n< m< n+ 11, divide n by 12 to see how large k must be. For example, with , the largest value of n that you have here, 12 divides into [tex]10^6= 1000000[/itex] 83333 times. Taking k= 83333, we have 7+ 12(83333)= 100003.

For n= -999, divide -999 by 12: 12 divides into -999 -83 times. Taking k= -83, we have 7+ 12(-83)= -989 which satisfies -999< -989< -988.