An animal shelter houses only dogs and cats. The shelter has a total of 40 animals. The daily food cost for each dog is $12, and for each cat is $7. If the total daily food cost for all animals at the shelter is $360, how many dogs are at the shelter?
12
16
24
28