Question: Write code in Java 2) Write a method: String getFactors(int n) that uses isPrime() and returns a String containing the prime factorization of n. For
Write code in Java
2) Write a method:
String getFactors(int n)
that uses isPrime() and returns a String containing the prime factorization of n.
For instance: getFactors(32) returns "2 * 2 * 2 * 2 * 2", and getFactors(123467982) returns "2 * 3 * 11 * 1087 * 1721".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
