In my town, 10% of the dogs think they are cats and 10% of the cats think they are dogs. One day I tested all the 160 cats and dogs in the town and found that 20% of them thought they were cats. How many of the 160 animals were cats?

32 thought they were cats.

so, assuming that those cats who did not think they were dogs, really are cats, and there are c cats,
0.9c + 0.1(160-c) = 32
c=20.
so there were 140 dogs.
check:
14+18 = 32

To find the number of cats among the 160 animals, we need to determine what percentage of the animals are cats.

Let's assume that the number of cats is x.

According to the information given, 10% of the dogs think they are cats, which implies that 90% of the dogs think they are dogs. Similarly, 10% of the cats think they are dogs, which means that 90% of the cats think they are cats.

Therefore, among the 160 animals in total, the percentage of animals that think they are cats is the sum of the percentage of cats and the percentage of dogs that think they are cats.

The percentage of cats among the animals is (x/160) * 100%, and the percentage of dogs that think they are cats is (10/100) * (90/100) * (160 - x), which gives us a final equation:

(x/160) * 100% + (10/100) * (90/100) * (160 - x) = 20/100

Now we can solve this equation to find the value of x.