A perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself.
Suppose the number 6. The divisors of 6 excluding itself are 1,2 and 3. We see that 6= 1+2+3
Similarly, we can check for 12. Its factors are 1,2,3,4,6.
Add all of them we get 1 + 2 + 3 + 4 + 6 = 16
So, 12 is not a perfect number.