解题思路:
注意事项:
参考代码:
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 人评分
数组输出 (C语言代码)浏览:767 |
母牛的故事 (C语言代码)浏览:435 |
DNA (C语言描述,数据结构)浏览:855 |
母牛的故事 (C语言代码)浏览:715 |
C语言程序设计教程(第三版)课后习题8.7 (C语言代码)浏览:526 |
1074(纳闷了,答案错误,求指教)浏览:362 |
蛇行矩阵 (C语言代码)浏览:542 |
陶陶摘苹果 (C语言代码)浏览:593 |
A+B for Input-Output Practice (C++代码)浏览:480 |
钟神赛车 (C++代码)(标准题解)(与田忌赛马类似)浏览:1730 |