A pen contained chickens and pigs. There were 28 legs and 9 heads. How many chickens were in the pen?

I think the answers in 4. Is that right?

Yes. That's right.

Yes you are correct 😽

How do you know though?

To determine the number of chickens in the pen, we need to use the information provided: there were a total of 28 legs and 9 heads.

Chickens have two legs, while pigs have four legs. Let's assume the number of chickens is represented by the variable C, and the number of pigs is represented by the variable P.

Since each chicken has two legs, the total number of chicken legs would be 2C. Similarly, since each pig has four legs, the total number of pig legs would be 4P.

We are told that there were a total of 28 legs, so we can set up the equation: 2C + 4P = 28.

Additionally, we know that there were 9 heads in total, which means the number of chickens and pigs combined is 9: C + P = 9.

Now we have a system of equations:
2C + 4P = 28,
C + P = 9.

We can solve this system of equations using various methods, such as substitution or elimination.

Let's use the substitution method. From the second equation, let's solve for C in terms of P: C = 9 - P.

Substitute this expression for C in the first equation:
2(9 - P) + 4P = 28.

Simplify the equation:
18 - 2P + 4P = 28,
18 + 2P = 28,
2P = 28 - 18,
2P = 10,
P = 10/2,
P = 5.

Now that we know the number of pigs is 5, we can substitute this value back into the equation C + P = 9 to find the number of chickens:
C + 5 = 9,
C = 9 - 5,
C = 4.

Therefore, there are 4 chickens in the pen, not 4 pigs.