MATLAB: Hello i have a homework that asks “Perfect number is if it is equal to the sum of all of its positive divisors, excluding itself. There are 4 perfect numbers less than 1000. Write a program to find them.” can you tell me how to do this in Matlab

homework

A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. There are 4 perfect numbers less than 1000. Write a program to find all of them. 6 is a perfect number because 6 = 3 + 2 + 1 28 is a perfect number because 28 = 14 + 7 + 4 + 2 + 1 Output: Perfect numbers are 6, 28, ?? and ??.

Best Answer