Question 703427
Let {{{H}}}=number of chickens
and {{{C}}}=number of cows


"There are 38 animals in a farmyard":
so {{{ C + H=38 }}}


"In total there are 104 legs":
Chickens have two legs, cows have 4 legs
so, {{{2H+4C=104}}}
or, {{{H+2C=52}}}


But from 1st equation {{{C=38-H}}} so {{{2C=76-2H}}}
substituting for {{{2C}}} in 2nd equation gives:
{{{H+(76-2H)=52}}}
{{{76-H=52}}}
{{{H=76-52=24}}}


So there are 24 chicken (and 14 cows)