For a given integer n > 1, the smallest integer d > 1 that divides n is a prime factor. We can find the prime factorization of n if we find d and then replace n by the quotient of n divided by d, repeating this until n becomes 1. Write a java program that uses a stack to print the prime factors of a positive integer in descending order. For example, for n = 3960, your program should produce 11*5*3*3*2*2*2.

A stack can be used to print numbers in other bases (multibase output). Examples:

• (Base8) 28 base 10 = (3 * 8^1) + (4 * 8^0) = 34 base 8
• (Base4) 72 base 10 = (1 * 4^3) + (0 * 4^2) + (2 * 4^1) + (0 * 4) = 1020 base 4
• (Base 2) 53 base 10 = (1 * 2^5) + (1 * 2 ^ 4) + (0 * 2^3) + (1 * 2^2) + (0 * 2^1) + (1 * 2^0) = 110101 base 2

Write a java program using stacks that takes 3 non-negative (base 10) long integer numbers and a base B (B is in the range 2-9) end writes the number to the screen as a base B number. The program prompts the user for 3 numbers and bases, and then outputs them.

Use as input:

• 72 base 10 to base 4
• 53 base 10 to base 2
• 3553 base 10 to base 8