Set up your equations:
P = # of python scripts
J = # of javascripts
C = # of Cubescripts
P + J + C = 100
5P + 2J + C/10 = 100
multiply the 2nd equation by 10 and subtract the two equations from each other
10(5P + 2J + C/10 = 100)
=> 50P +20J + 10C/10 = 1000
Subtract: P + J + C = 100
==> 49P + 19J = 900
Now, there are lots of ways to do that, but you need both P and J to be integers. Notice that 900 is divisible by 10. Divide the whole equation by 10
$4.9 P + $1.9 J = $90
Now, you know that I need to make exactly $90 selling just python scripts and javascripts. Each time I sell a script, I have to give a dime in change. To get back to an exact dollar figure, I will need to sell some multiple of 10 scripts. So, make the substitution
P + J = 10 n
Now, solve for P and substitute
49 n - 3 J = 90
Remembering that n and J are both integers, n must be a multiple of 3 (divide that equation by 3 and see). So try, n=3, 6, 9, etc.
For n=3, J = 19
For n=6, J = 68
For n=9, J = 117 (which is impossible.)
If J = 19, then P = 11 and C = 70.
If J = 68, then P = -8 which is impossible.
So, the only possible answer is 11 python scripts, 19 javascripts and 70 cubescripts.
P = # of python scripts
J = # of javascripts
C = # of Cubescripts
P + J + C = 100
5P + 2J + C/10 = 100
multiply the 2nd equation by 10 and subtract the two equations from each other
10(5P + 2J + C/10 = 100)
=> 50P +20J + 10C/10 = 1000
Subtract: P + J + C = 100
==> 49P + 19J = 900
Now, there are lots of ways to do that, but you need both P and J to be integers. Notice that 900 is divisible by 10. Divide the whole equation by 10
$4.9 P + $1.9 J = $90
Now, you know that I need to make exactly $90 selling just python scripts and javascripts. Each time I sell a script, I have to give a dime in change. To get back to an exact dollar figure, I will need to sell some multiple of 10 scripts. So, make the substitution
P + J = 10 n
Now, solve for P and substitute
49 n - 3 J = 90
Remembering that n and J are both integers, n must be a multiple of 3 (divide that equation by 3 and see). So try, n=3, 6, 9, etc.
For n=3, J = 19
For n=6, J = 68
For n=9, J = 117 (which is impossible.)
If J = 19, then P = 11 and C = 70.
If J = 68, then P = -8 which is impossible.
So, the only possible answer is 11 python scripts, 19 javascripts and 70 cubescripts.