Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution {
- public void recursion(int n) {
- int m = 2;
- while (m <= n) {
- if (n % m == 0) {
- System.out.print(m + " ");
- if (m == n)
- return;
- recursion(n / m);
- break;
- }
- m++;
- }
- }
- public static void main(String[] args) {
- new Solution().recursion(132);
- }
- }
Add Comment
Please, Sign In to add comment