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:
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: