A 'perfect number' is one which is equal to the sum of its factors excluding itself, e.g. the factors of 6 are 1, 2, 3 and 6. Excluding the last factor 1+2+3=6. There is one more 'perfect' number before 100, another before 1000 and another before 1000!

Write a BASIC or QBASIC program (you may modify the program in the previous issues) to:

  1. input an integer and generate its factors
  2. then test to see if it is 'perfect'
  3. input the numbers 1-100 and test to find the perfect numbers
  4. repect 3/ for intervals 100-1000 and 1000-10,000.

Bill Simpson
Brisbane State High School