Step-by-step explanation:
step 1. let cows = c and chickens = h
step 2. c + h = 40
step 3. 4c + 2h = 100 (cows have 4 legs and chickens have 2)
step 4. solve the system. multiply step 2 by 2 and subtract from step 3
step 5. 2c = 20 or c = 10 (10 cows)
step 6. h = 30 (30 chickens)