Daniel has 21 coins. All of them are either quarters or dimes. Altogether, he has $3.45. How many of each type of coin does he have?

number of quarters --- x

number of dimes --- 21-x

25x + 10(21-x) = 345
25x + 210 - 10x = 345
15x = 135
x = 9

He has 9 quarters and 12 dimes

check:
9(25) + 12(10) = 345 , check!!

To solve this problem, we can set up a system of equations based on the given information.

Let's say Daniel has x quarters and y dimes.

Since quarters are worth 25 cents, the total value of the quarters can be calculated as 25x.
Similarly, since dimes are worth 10 cents, the total value of the dimes can be calculated as 10y.

According to the problem, Daniel has a total of 21 coins. So we have the equation:

x + y = 21 (Equation 1)

The total value of all the coins is given as $3.45. Converting this amount to cents, we have:

25x + 10y = 345 (Equation 2)

Now we have a system of equations:

x + y = 21
25x + 10y = 345

We can solve this system of equations to find the values of x and y.

To do this, we can use the method of substitution or elimination. Let's use the method of substitution:

From Equation 1, we can solve for x in terms of y:

x = 21 - y

Now we substitute this value of x into Equation 2:

25(21 - y) + 10y = 345

Expanding and simplifying:

525 - 25y + 10y = 345

Combining like terms:

-15y = -180

Dividing both sides by -15:

y = 12

Now we can substitute this value of y back into Equation 1 to solve for x:

x + 12 = 21
x = 21 - 12
x = 9

Therefore, Daniel has 9 quarters and 12 dimes.

Let's solve this problem step by step:

Step 1: Assign variables
Let's assign a variable to represent the number of quarters and another variable to represent the number of dimes.
Let's say:
q = number of quarters
d = number of dimes

Step 2: Set up equations
We know that Daniel has a total of 21 coins and the sum of the values of these coins is $3.45.

The first equation represents the total number of coins:
q + d = 21

The second equation represents the total value of the coins in dollars:
0.25q + 0.10d = 3.45

Step 3: Solve the equations
To solve the system of equations, we can use substitution or elimination method. In this case, let's use the elimination method.

Multiply the first equation by 0.25 to make the coefficients of q in both equations the same:
0.25(q + d) = 0.25(21)
0.25q + 0.25d = 5.25

Now we have the system of equations:
0.25q + 0.10d = 3.45
0.25q + 0.25d = 5.25

Subtract the first equation from the second equation to eliminate q:
(0.25q + 0.25d) - (0.25q + 0.10d) = 5.25 - 3.45
0.25d - 0.10d = 1.80
0.15d = 1.80
d = 1.80 / 0.15
d = 12

Now substitute the value of d back into one of the equations to find the value of q:
q + 12 = 21
q = 21 - 12
q = 9

Step 4: Answer the question
Daniel has 9 quarters and 12 dimes.

Therefore, Daniel has 9 quarters and 12 dimes.