// Question: decompose a positive integer into a prime factor. For example, enter 90 and print 90 = 2*3*3*5.
// Program analysis: to decompose the prime factor of N, you should first find a minimum prime number k, and then follow the steps below to complete:
// (1) if the prime number is equal to N, it indicates that the process of decomposing the prime factor is over. Print it out.
// (2) if n <> K, but N can be divisible by K, the value of K should be printed and divided by the quotient of N, as the new positive integer you n, repeat the first step.
// (3) if n cannot be divisible by K, k + 1 is used as the value of K and the first step is repeated.
Package com. MuMu. ready;
Import java. util. collections;
Public class fenjie {
Public static void main (string [] ARGs ){
Pipeline can = new pipeline (system. In );
System. Out. println ("enter a positive integer :");
Int n = can. nextint ();
System. Out. Print (n + "= ");
For (int K = 2; k <n/2; k ++ ){
If (n = K)
System. Out. println (k );
Else {
If (N % K = 0 ){
System. Out. Print (K + "*");
N = N/K;
}
}
}
System. Out. println (N );
}
}