What's the best way of going about this?
$$2x+3y=200.$$
What's the best way of going about this?
$$2x+3y=200.$$
On
This called a Linear Diophantine Equation, and the general form is $ax+by=c$. One approach that will solve a variety of equations like this particular one is to note that the $\gcd(2,3)=1$, and applying the Euclidean Algorithm is a general way to do this. In this case, the algorithm takes one line ($3=2 \cdot 1 +1$), and so $$3=2 \cdot 1 +1 \Rightarrow 3 \cdot 1 -2 \cdot 1 = 1 \Rightarrow 2(-1)+3 (1)=1.$$ Now multiplying across by 200 gives one integral solution, namely $$2(-200)+3 (200)=200.$$ To find all integral solutions, where $x_0=-200$, $y_0=200$, $d=\gcd(2,3)$, $a=2$, and $b=3$, we can just write $$x=\frac{b}{d}n+x_0=3n-200, \,\, y=-\frac{a}{d}n+y_0=-2n+200, \,\, n \in \mathbb{Z}.$$
The links above should help you with solving this class of equations and provide greater explanation. I hate posting formulas with no derivation, but such derivations exceed the scope of your question, and are readily available on the internet.
For this case, if $2x+3y=200$, an obvious solution is $x=100, y=0$.
From this base solution, all other integer solutions are $x=100-3n$, $y=2n$ for integer $n$.
If the solutions are to be non-negative, then $n \ge 0$ and $100-3n \ge 0$, so $0 \le n \le \lfloor(100/3)\rfloor =33$.