Jan-23-2019, 04:15 PM
(This post was last modified: Jan-23-2019, 04:16 PM by ichabod801.)
To get the prime factors of a number:
- Start with factor = 2, and all_factors = []
- As long a number is evenly divisible by factor, divide number by factor and append factor to all_factors.
- Increase factor by 1
- Repeat the last two steps until number == 1.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures