A bakery produces two types of pastries: croissants and danishes. Each croissant requires 1.5 ounces of flour and each danish requires 2.25 ounces of flour. The bakery has a total of 40 ounces of flour available. If the bakery wants to make a total of 24 pastries, how many croissants can they make while maximizing the number of danishes?
Let the number of croissants be represented by $c$ and the number of danishes by $d$. This can be set up as a system of equations given by:
1. $c + d = 24$
2. $1.5c + 2.25d extless= 40$