Final answer:
To find the number of sunglasses and bottles of sunscreen purchased, we can set up a system of equations. Solve the equations to find the values of x and y.
Step-by-step explanation:
To find the number of sunglasses and bottles of sunscreen purchased, we can set up a system of equations. Let's say x represents the number of sunglasses and y represents the number of sunscreen bottles. We have the following equations:
x + y = 11 (Total number of items purchased)
- 18x + 8y = 128 (Total amount spent)
We can solve this system of equations to find the values of x and y. Multiplying the first equation by 8, we get 8x + 8y = 88. Subtracting this equation from the second equation, we get:
18x + 8y - (8x + 8y) = 128 - 88
10x = 40
x = 4
Substituting the value of x into the first equation, we have:
4 + y = 11
y = 7
Therefore, 4 pairs of sunglasses and 7 bottles of sunscreen were purchased.