解题思路:
注意事项:
参考代码:
Scanner scanner=new Scanner(System.in);
int a=scanner.nextInt();
int b=scanner.nextInt();
for (int i = a; i <= b; i++) {
int t = i;
System.out.print(t + "=");
for (int j = 2; j <= t; j++) {
while (t % j == 0 && j != t) {
System.out.print(j + "*");
t /= j;
}
if (t == j) {
System.out.println(j);
}
}
}
0.0分
4 人评分