A farmhouse shelters 7 animals. Some are horses and some are ducks. Altogether there are 20 legs. How many of each animal are there?

Answer:
3 horses and 4 ducks
Step-by-step explanation:
let h be the no. of horses and d be the no. of ducks
h+d=7
d=7-h
Since horses have 4 legs and ducks have 2 legs,
4h+2d=20
4h+2(7-h)=20
4h+14-2h=20
2h=6
h=3
d=4