Let $n$ be a positive integer such that $n<1000$. If the sum of the digits of $n$ is divisible by 9, then $n$ is divisible by 9.
I got up to here:
$$100a + 10b + c = n$$ $$a+b+c = 9k,\quad k \in\mathbb{Z}$$
I didn't know what to do after this, so I consulted the solution
The next step is:
$$100a+10b+c = n = 9k +99a+9b = 9(k +11a+b)$$
I don't get how you can add $99a + 9b$ randomly, can someone please explain this for me?