I am trying to help my kid with a homework problem, and he's insisting that the only way to solve is trial and error. I want to know if there is a more systematic way - it sounds as though the teacher may have taught them to do it by guessing and verifying, but it has stoked my curiosity.
The cost of each item is 9 dollars. We know that some customer paid $18C43$, but the figure C is blurred out. How much did we pay? and How many items were purchased?
We can unfold $18C43 = 18043 + 100C$. And we know that $9n = 18043 + 100C$. But we end with have two unknowns in one equation. Of course we know that both C and n are natural numbers.
$9n=18043+100C$ divide through by $9.$
We really only care about the remainders.
$18043/9 = (2004) r 7$
$100/ 9 = (11) r 1$
9 must divide $(7 + C)$
This approach will work for any divisor. But 9's are special. If the sum of the digits is divisible by 9, then the number is divisible by 9.