cocojiz wrote:
How can I get fast to X=3 and Y=5? should I just plug in numbers? is this the best way to do it?
Hi
Let me see if I can help a bit.
we have 5x + 3y = 30 and we know both x and y have to be positive integers.
5x is obviously a multiple of 5, and on the right side 30 is also a multiple of 5. So, by simple logic, '3y' also must be a multiple of 5.
For '3y' to be a multiple of 5, 'y' must be a multiple of 5.
so we put y=5, and get 5x + 3*5 = 30. This gives us x=3
If we put y=10, we get x =0 which is not possible.
There is another way. 5x + 3y = 30 and we know both x and y have to be positive integers.
3y is obviously a multiple of 3, and on the right side 30 is also a multiple of 3. So, by simple logic, '5x' also must be a multiple of 3.
For '5x' to be a multiple of 3, 'x' must be a multiple of 3.
so we put x=3, and get 5*3 + 3y = 30. This gives us y=5
If we put x=6, we get y =0 which is not possible
This method sometimes helps.