One Hundred Fowls

Classic Problem
$100$ fowls were sold for $100$ shillings.
 * The cockerels were sold for $5$ shillings each.
 * The hens were sold for $3$ shillings each.
 * The chicks were sold for $\frac 1 3$ of a shilling each.

How many of each were sold?

Solution
There were either:
 * $0$ cockerels, $25$ hens and $75$ chicks;
 * $4$ cockerels, $18$ hens and $78$ chicks;
 * $8$ cockerels, $11$ hens and $81$ chicks;
 * $12$ cockerels, $4$ hens and $84$ chicks.

Proof
Let $x$, $y$ and $z$ denote the number of cockerels, hens and chicks respectively.

We are to solve for $x, y, z \in \N$:

$7 x$ must be divisible by $4$.

Hence so must $x$.

Write $x = 4 n$.

Then the problem is reduced to:
 * $7 n + y = 25$

Hence $0 \le n \le 3$.

We list the solutions $\tuple {n, x, y, z}$ for each $n$:
 * $\tuple {0, 0, 25, 75}, \tuple {1, 4, 18, 78}, \tuple {2, 8, 11, 81}, \tuple {3, 12, 4, 84}$