title: Smallest number with digits product of n
body: <p>I need to find the smallest number which digit numbers product is equal to a given num. </p>
  
  <pre><code>import java.util.Scanner;
  
  class timus_1014_2 {
  
      public static void main(String[] args){
          int[] arr = new int[10]; // eskan ban@  chem imanum inchi a statik,
          int prod = 1;
          int j = 0;
  
          Scanner in = new Scanner(System.in);
          int n = in.nextInt();
          for (int i = 2; i &lt; 10; ++i){
              if (n % i == 0) {
                  arr[j] = i;
                  j++;
              }
          }
          prod =  prod * arr[j];
  
          System.out.print(prod);
  
      }
  }
  </code></pre>
  
  <p>Something is wrong with the logic, whats is the problem when I input <code>10</code> it should give <code>25</code> but it gives <code>0</code>. Please give ideas of how to make a program find a number which digits product is a given num.</p>