标签:
import java.util.Scanner; public class Main { static String fun(int n){ for(int i=2;i<n;i++){ if(n%i==0){ return i+"*"+fun(n/i); } } return ""+n; } public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b= sc.nextInt(); for(int i=a;i<=b;i++){ System.out.print(i+"="); System.out.print(fun(i)); System.out.println(); } } }
标签:
原文地址:http://www.cnblogs.com/watchfree/p/5316595.html