Gary has $1.56 in change in his pocket. if there is a total of 19 coins, how may quarters, dimes, nickeland pennies does her have?

2 quarters = $0.50

9 dimes = $0.90
2 nickels = $0.10
6 pennies = $0.06
----------------------------
19 coins = $1.56

Diana has 12 coins worth $0.52. If the coins are all nickels and pennies, how many nickels and pennies does she have?

Let's solve this problem step by step.

Step 1: Let's assume the number of quarters Gary has is Q.
Step 2: Let's assume the number of dimes Gary has is D.
Step 3: Let's assume the number of nickels Gary has is N.
Step 4: Let's assume the number of pennies Gary has is P.

We know that the total number of coins Gary has is 19, so we can write an equation:

Q + D + N + P = 19 (Equation 1)

We also know that the value of all the quarters is equal to $0.25 times the number of quarters, the value of all the dimes is equal to $0.10 times the number of dimes, the value of all the nickels is equal to $0.05 times the number of nickels, and the value of all the pennies is equal to $0.01 times the number of pennies. So we can write another equation for the total value of the change:

0.25Q + 0.10D + 0.05N + 0.01P = $1.56 (Equation 2)

Now we have a system of equations with two equations and four unknowns. We can solve this system by substitution or elimination. Let's use substitution.

We solve Equation 1 for one variable. Let's choose Q:

Q = 19 - D - N - P

Now we substitute this value of Q in Equation 2:

0.25(19 - D - N - P) + 0.10D + 0.05N + 0.01P = $1.56

4.75 - 0.25D - 0.25N - 0.25P + 0.10D + 0.05N + 0.01P = $1.56

Combine like terms:

-0.15D - 0.20N - 0.24P = -3.19 (Equation 3)

Now we have two equations:

Q + D + N + P = 19 (Equation 1)

-0.15D - 0.20N - 0.24P = -3.19 (Equation 3)

We can rearrange Equation 1 to solve for Q:

Q = 19 - D - N - P

Now we substitute this value of Q in Equation 3:

-0.15D - 0.20N - 0.24P = -3.19

We can simplify the decimal numbers by multiplying them by 100:

-15D - 20N - 24P = -319 (Equation 4)

Now we have two equations:

Q = 19 - D - N - P (Equation 1)

-15D - 20N - 24P = -319 (Equation 4)

We need to solve this system of equations to find the values of D, N, and P.

To find out how many quarters, dimes, nickels, and pennies Gary has, we'll need to use a bit of algebra. Let's assume the number of quarters is q, the number of dimes is d, the number of nickels is n, and the number of pennies is p.

We can create a system of equations based on the given information:

1. The value of quarters would be 25 cents each, so the equation for the value of quarters is: 25q.
2. The value of dimes would be 10 cents each, so the equation for the value of dimes is: 10d.
3. The value of nickels would be 5 cents each, so the equation for the value of nickels is: 5n.
4. The value of pennies would be 1 cent each, so the equation for the value of pennies is: 1p.
5. The total value of the coins is $1.56, so the equation for the total value is: 25q + 10d + 5n + 1p = 156.

We also know that the total number of coins is 19, so we have another equation: q + d + n + p = 19.

Now we have a system of two equations with four variables. We can solve this system to find the values of q, d, n, and p.

One way to solve this system is by substitution, which involves solving one equation for one variable and substituting it into the other equation. However, as it can be a bit complicated with four variables, let's solve it using a different method: elimination.

We can use the elimination method to eliminate one variable at a time by multiplying one or both of the equations by a constant so that the coefficients of one variable will be opposites. Let's proceed step-by-step:

1. Multiply both sides of the first equation (25q + 10d + 5n + p = 156) by 25 to eliminate the variable q:
25(25q + 10d + 5n + p) = 25(156)
625q + 250d + 125n + 25p = 3900

2. Multiply both sides of the second equation (q + d + n + p = 19) by 125 to eliminate the variable q:
125(q + d + n + p) = 125(19)
125q + 125d + 125n + 125p = 2375

Now, by subtracting the first equation from the second, we can eliminate the variable q:

(125q + 125d + 125n + 125p) - (625q + 250d + 125n + 25p) = 2375 - 3900
-500q - 125d + 0n + 100p = -1525

Simplifying, we have:
-500q - 125d + 100p = -1525

Now we have two linear equations in two variables (d and p). Let's simplify the second equation if needed.

Now, we have a system of two linear equations:
-500q - 125d + 100p = -1525 ...(Equation 1)
q + d + n + p = 19 ...(Equation 2)

To find the values of q, d, n, and p, you would need to solve this system of equations, which can be done by different methods such as substitution or elimination.