Module: (Java) Subrutinas: Procedimientos y Funciones - 2


Problem

4/11

Número de divisores de un número

Problem

Escribe una función que devuelva el número de divisores de un número natural
Ejemplos
# Entrada Salida
1 6 4
Write the program below
public static void main(String[] args) {
   Scanner in = new Scanner(System.in);
   int n;
   n = in.nextInt();
   System.out.println(numberOfDivisors(n));
  }  
} 

     

Program check result

To check the solution of the problem, you need to register or log in!