For instance, if we have to list the factors of a number y. Then, we have to look for all possible numbers within the range 0 to the number y (with 0 exclusive because we do not divide a number by 0) that gives no remainder when it divides y.
Example:
Input 6
Output {1,2,3,4,5,6,}.
Let's Write out a PHP function to do this for us:
Program/Source Code:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer