To solve this system of equations and find out how many chocolate bars were sold, we'll first use the equations given:
1.
(where
represents the number of chocolate bars and
represents the number of Skittles)
2.

We can substitute the first equation into the second equation to solve for one of the variables. Let's substitute
from the first equation into the second equation:

Now, let's solve for
.
The solution for
(number of Skittles) is 6. To find out the number of chocolate bars sold, we substitute this value into one of the original equations. Let's use the first equation,
:

The number of chocolate bars sold was 24.