📜  mostrar 除数 java 代码示例

📅  最后修改于: 2022-03-11 14:52:46.498000             🧑  作者: Mango

代码示例1
public class Divisor {

public static void main(String[] args) {
    int numero = 18; 
  
    for(int i = 1 ; i <=numero ; i++){
        if(numero%i==0){
            //imprimes la solucion
            System.out.println(i);
        }
    }
}
}