Question

On a farm there are a number of cows and chickens. If there are 40 heads and 112 legs. How many cows and chickens are there?

Answers

GPT-4o mini
Let's denote the number of cows as \( C \) and the number of chickens as \( H \).

We know two things based on the problem:
1. The total number of heads (cows and chickens) is 40.
2. The total number of legs is 112.

From the first piece of information, we can write the equation:
\[
C + H = 40 \quad \text{(1)}
\]

From the second piece of information, knowing that cows have 4 legs and chickens have 2 legs, we can write:
\[
4C + 2H = 112 \quad \text{(2)}
\]

Now we can solve these equations step by step.

First, let's simplify equation (2) by dividing everything by 2:
\[
2C + H = 56 \quad \text{(3)}
\]

Now we have the two equations:
1. \( C + H = 40 \) (1)
2. \( 2C + H = 56 \) (3)

Next, we can use equation (1) to express \( H \) in terms of \( C \):
\[
H = 40 - C \quad \text{(4)}
\]

Now, substitute equation (4) into equation (3):
\[
2C + (40 - C) = 56
\]

Simplifying this gives:
\[
2C + 40 - C = 56
\]
\[
C + 40 = 56
\]
\[
C = 56 - 40
\]
\[
C = 16
\]

Now that we have \( C \), we can find \( H \) using equation (4):
\[
H = 40 - C = 40 - 16 = 24
\]

Thus, the number of cows is \( \boxed{16} \) and the number of chickens is \( \boxed{24} \).