Answer: There are 18 ostriches and 5 llamas.
Explanation:
We know that, an ostrich has 2 legs and 1 head and llama has 4 legs and one head.
Let x= Number of ostriches
y= Number of llamas.
As per given,
x+y = 23 (i)
2x+4y=56 (ii)
Divide (ii) by 2 , we get
x+2y = 28 (iii)
Eliminate (i) from (iii) , we get
y = 5
Put y=5 in (i) , we get
x+5=23
⇒ x= 23-5= 18
Hence, there are 18 ostriches and 5 llamas.