JAVA课程06
package 因子输出; import java.util.Scanner; public class 因子输出 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int a = in.nextInt(); for(int i = 1; i <= a; i++) { if(a % i == 0) System.out.print(i+" "); } } }