Guest User

Untitled

a guest
Oct 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class Solution {
  2. public void recursion(int n) {
  3. int m = 2;
  4. while (m <= n) {
  5. if (n % m == 0) {
  6. System.out.print(m + " ");
  7. if (m == n)
  8. return;
  9. recursion(n / m);
  10. break;
  11. }
  12. m++;
  13. }
  14. }
  15.  
  16. public static void main(String[] args) {
  17. new Solution().recursion(132);
  18. }
  19. }
Add Comment
Please, Sign In to add comment