It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetor开发者_如何学Goical andcannot be reasonably answered in its current form.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetor开发者_如何学Goical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
hey i need to desing a program that inputs an integer and outputs the prime factors of the integer example
660 input n output is 2 2 3 5 11
Break the problem down. Firstly, you need a list of every prime number smaller than the square root of the input. You can obtain this list slowly through trial division, or quickly by using something like Eratosthenes' Sieve - implement that, and you're halfway there. Everything else should fall into place.
精彩评论