one day a store sold 18 sweatshirts, white ones cost $9.95 and yellow ones cost 12.50. in all 222.45 worth of sweatshirts were sold. how many of each were sold?

number of whites --- x

number of yellows --- 18-x

995x + 1250(18-x) = 22245
(I changed the $'s to cents)

solve for x, has to come out as a whole number

To solve this problem, let's assume that x represents the number of white sweatshirts sold, and y represents the number of yellow sweatshirts sold.

We know that the store sold a total of 18 sweatshirts, so we can write the first equation: x + y = 18.

We also know the cost of each sweatshirt. The cost of white sweatshirts is $9.95, and the cost of yellow sweatshirts is $12.50. So, the second equation becomes: 9.95x + 12.50y = 222.45.

Now we have a system of two equations with two variables. We can use methods like substitution or elimination to solve this system.

Let's solve it using the elimination method. Multiply the first equation by 9.95 to cancel out the x variable with the second equation:

9.95(x + y) = 9.95(18)
9.95x + 9.95y = 178.10

Now we have the system of equations:
9.95x + 9.95y = 178.10
9.95x + 12.50y = 222.45

Subtract the first equation from the second equation to eliminate x:
(9.95x + 12.50y) - (9.95x + 9.95y) = 222.45 - 178.10
2.55y = 44.35

Now, solve for y by dividing both sides of the equation by 2.55:
y = 44.35 / 2.55
y ≈ 17.39

Since we cannot sell fractional sweatshirts, we need to round y to the nearest whole number. In this case, y would be 17.

Now substitute the value of y back into the first equation to find x:
x + 17 = 18
x = 18 - 17
x = 1

Therefore, the store sold 1 white sweatshirt and 17 yellow sweatshirts.