Final answer:
You bought 10 bags of Halloween M&Ms, 17 bags of candy corn, and 0 bags of fun-size candy bars.
Step-by-step explanation:
To find the number of each type of candy, let's assign variables to represent the unknown quantities:
Let x = number of bags of Halloween M&Ms
Let y = number of bags of candy corn
Let z = number of bags of fun-size candy bars
From the given information, we can set up a system of equations:
x + y + z = 4 (Equation 1)
1.5x + 2.3y + 3.5z = 60.10 (Equation 2)
We are also given two additional equations:
y = 2x - 3 (Equation 3)
3x - 5 = 5 - 3y (Equation 4)
To solve this system of equations, we can substitute the values in Equation 3 and Equation 4 into Equation 1 and Equation 2 respectively.
After solving this system of equations, we find that x = 10, y = 17, and z = -6.
Since we cannot have a negative number of candy bars, we can conclude that the number of bags of fun-size candy bars is 0.
Therefore, you bought 10 bags of Halloween M&Ms, 17 bags of candy corn, and 0 bags of fun-size candy bars.