import java.util.Scanner;
class ZhiShu
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("请输入一个正整数:");
int number = sc.nextInt();
System.out.print(number+"=");
for(int x=2;x<=number;x++){
while(number%x == 0 && number != x){
number /= x;
System.out.print(x+"*");
}
if(number == x){
System.out.println(x);
}
}
}
} |
|