Answer:
Let the number of pigs be x. So the number of ducks will be 10 - x.
Since pigs have 4 legs and ducks have 2 legs, then we have
4x + 2(10 - x) = 36. Solve for x:
4x + 20 - 2x = 36
2x + 20 = 36 subtract 20 to both sides
2x = 16 divide by 2 to both sides
x = 8
10 - x = 10 - 8 = 2
Thus, there are 8 pigs and 2 ducks.
Check: