Answers for "mostrar divisores java"

0

mostrar divisores java

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);
        }
    }
}
}
Posted by: Guest on February-18-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language