c = amount of chickens
p = amount of pigs
now, let's recall that chicken have two legs, and pigs have four legs, whatever "c" is, the amount of legs for all chicken is 2*c, or 2c.
the amount of legs for pigs is 4*p or 4p.
we know there are 36 legs total, therefore 2c + 4p = 36.
we also know that there are 11 heads, since each only has one head, then c + p = 11.
