A customer at a bakery paid $78.30 for donuts and cupcakes. Each donut cost $1.95 and each cupcake cost $2.85. If they bought a total of 30 donuts and cupcakes, how many donuts did they buy?​

Respuesta :

Answer:

[tex] x+y = 30[/tex]   (1)

[tex] 1.95x+ 2.85y = 78.30[/tex]   (2)

From equation (1) we can solve for x and we got:

[tex] x = 30-y[/tex] (3)

Replacing (3) into (2) we got:

[tex] 1.95(30-y) +2.85 y = 78.30[/tex]

And solving for y we got:

[tex] 58.5 -1.95 y +2.85 y = 78.30[/tex]

[tex] 0.9 y = 19.8[/tex]

[tex] y = 22[/tex]

And then solving for x we got:

[tex] x = 30-22 = 8[/tex]

So then we have 8 donuts and 22 cupcakes

Step-by-step explanation:

Let x the number of donuts and y the number of cupcakes, from the info given we can set up the following equations:

[tex] x+y = 30[/tex]   (1)

[tex] 1.95x+ 2.85y = 78.30[/tex]   (2)

From equation (1) we can solve for x and we got:

[tex] x = 30-y[/tex] (3)

Replacing (3) into (2) we got:

[tex] 1.95(30-y) +2.85 y = 78.30[/tex]

And solving for y we got:

[tex] 58.5 -1.95 y +2.85 y = 78.30[/tex]

[tex] 0.9 y = 19.8[/tex]

[tex] y = 22[/tex]

And then solving for x we got:

[tex] x = 30-22 = 8[/tex]

So then we have 8 donuts and 22 cupcakes