Let's denote the number of pigs as \( p \) and the number of chickens as \( c \).
We have two equations based on the information provided:
-
The total number of animals: \[ p + c = 220 \]
-
The total number of legs (pigs have 4 legs and chickens have 2 legs): \[ 4p + 2c = 700 \]
Now, we can solve these equations step by step.
First, we can simplify the second equation by dividing everything by 2: \[ 2p + c = 350 \]
Now we have a system of equations:
- \( p + c = 220 \)
- \( 2p + c = 350 \)
Let's subtract the first equation from the second: \[ (2p + c) - (p + c) = 350 - 220 \] This simplifies to: \[ p = 130 \]
Now, we can substitute \( p \) back into the first equation to find \( c \): \[ 130 + c = 220 \] \[ c = 220 - 130 = 90 \]
Thus, the number of pigs \( p \) is \( \boxed{130} \).