解题思路:
注意事项:
参考代码:
import java.text.DecimalFormat; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int a=scanner.nextInt(); int b=scanner.nextInt(); int c=0; for (int i =a; i <= b; i++) { { c=i; String d=i+"="; for (int j = 2; j <= c; j++) { if(c%j==0) { c=c/j; d=d+j+"*"; j=1; } } System.out.println(d.substring(0,d.length()-1)); } } } }
0.0分
0 人评分