title: Convert a base 10 number to a base 3 number
body: <p>How to convert a base 10 number to a base 3 number with a method int converter(int num).</p>
  
  <pre><code>import java.util.Scanner;
  
  public class BaseConverter {
      int answer;
      int cvt = 0;
      while (num &gt;= 0) {
          int i = num / 3;
          int j = num % 3;
          String strj = Integer.toString(j);
          String strcvt = Integer.toString(cvt);
          strcvt = strj + strcvt;
          num = i;
          break;
      }
      answer = Integer.parseInt("strcvt");
      return answer;
  }
  
  public static void main(String[] agrs) {
      Scanner in = new Scanner(System.in);
      System.out.println("Enter a number: ");
      int number = in.nextInt();
      System.out.print(converter(number));
      in.close();
  }
  </code></pre>
  
  <p>It was Compilation completed. But when I tried to run it, and entered a number, it showed that 
  java.lang.NumberFormatException: For input string: "strcvt"
  I don't know how to fix it. How can I do this without using string?</p>