In a yard there are 7 more pigs than hens all legs add up to 58 legs so how many pigs are there

write what you are given:

p = h+7
4p+2h = 58

Now it's a cinch, right?

To solve this problem, we can start by assigning variables.

Let's say the number of hens is represented by 'H', and the number of pigs is represented by 'P'.

We know that there are 7 more pigs than hens, so we can write the equation:
P = H + 7 (Equation 1)

Next, we need to consider the number of legs. Hens have 2 legs each, and pigs have 4 legs each. The total number of legs can be expressed as:
2H + 4P = 58 (Equation 2)

Now, we can solve the system of equations consisting of Equation 1 and Equation 2 to find the values of H and P.

Step 1: Substitute Equation 1 into Equation 2:
2H + 4(H + 7) = 58

Simplify the equation:
2H + 4H + 28 = 58
6H + 28 = 58

Step 2: Subtract 28 from both sides:
6H = 58 - 28
6H = 30

Step 3: Divide both sides by 6:
H = 30 / 6
H = 5

So, there are 5 hens in the yard.

Step 4: Substitute the value of H back into Equation 1 to find the number of pigs:
P = H + 7
P = 5 + 7
P = 12

Therefore, there are 12 pigs in the yard.

To solve this problem, we need to set up a system of equations based on the given information.

Let's assume the number of hens in the yard is 'h'. Since each hen has 2 legs, the total number of hen legs can be calculated as 2 * h = 2h.

According to the problem, there are 7 more pigs than hens in the yard. So, the number of pigs can be represented as 'h + 7'. Since each pig has 4 legs, the total number of pig legs can be calculated as 4 * (h + 7) = 4h + 28.

The problem states that the total number of legs in the yard is 58. So we can set up the equation:

2h + 4h + 28 = 58

Now, let's solve the equation to find the value of 'h' (number of hens):

6h + 28 = 58
6h = 58 - 28
6h = 30
h = 30 / 6
h = 5

Therefore, the number of hens in the yard is 5.

To find the number of pigs, we can substitute the value of 'h' back into the equation 'h + 7':

pigs = h + 7
pigs = 5 + 7
pigs = 12

Therefore, there are 12 pigs in the yard.