A farmer has 20 pigs ans sheep.he has 6 fewer sheep than pigs. How many pigs does he have?

Let x = pigs

x + x - 6 = 20

2x = 26

x = 13

He has 14 sheep

To find the number of pigs the farmer has, we need to set up an equation based on the given information.

Let's represent the number of pigs as "x" and the number of sheep as "y".

According to the problem, we know that "he has 6 fewer sheep than pigs," which can be written as:

y = x - 6

Additionally, we know that the farmer has a total of 20 pigs and sheep combined, so we can write another equation:

x + y = 20

Now we have a system of two equations that we can use to solve for the number of pigs (x). We can solve this system of equations using the substitution method or the elimination method.

Let's use the substitution method:

First, we substitute the value of y from the first equation into the second equation:

x + (x - 6) = 20

Simplifying the equation:

2x - 6 = 20

Now, we isolate the x term:

2x = 20 + 6
= 26

Dividing both sides by 2:

x = 26 / 2
= 13

Therefore, the farmer has 13 pigs.