1 quarter = $0.25, therefore 20 quarters = 20 x 0.25 = $5.00
1 dime = $0.10, therefore 12 dimes = 12 x 0.10 = $1.20
So $5.00 + $1.20 = $6.20
And knowing one ice cream is $1.00, he can only buy 6 ice creams using $6.00, because it is not possible to buy an ice cream for 0.20, you cannot have a segment of an ice cream, knowing $1.00 is for ONE FULL ICE CREAM, he can only buy 6, so he can buy it for 6 friends.