Problem: gwtting as close to $10000.00 as you can what are the values of x,y,z?
(64.09 * y)+(333.19 * z)+(403.00 * x) = as close to 10000.00 as possible... what are the values of x, y, z?
You have $10,000 and need to split the money up between 3 stocks as equally as possible spending as much of the $10,000 as possible with out going over. How much of each stock must you buy if the 3 stock prices are $64.09/share, $333.19/ share, & $403.00/ share?
Because you are trying to divide $10,000 equally among three stocks,
each stock should be valued at $3,333.33, or nearly so. Divide that
figure by the share price of each stock to find the number of shares
you can buy for each one.
Price of y = $64.09
$3,333.33 / $64.09 = 52.01, round down to 52 shares
Price of z = $333.19
$3,333.33 / $333.19 = 10.004, round down to 10 shares
Price of x = $403.00
$3,333.33 / $403.00 = 8.27, round down to 8 shares
(64.09 * 52)+(333.19 * 10)+(403.00 * 8) =
(3332.68)+(3331.90)+(3224.00) = 9888.58
Answer: 52 shares of y, 10 shares of z, 8 shares of x