title: Divide two large numbers as strings without using Bignumbers in java
body: <p>I need to divide two large integers WITHOUT using Biginteger since the Numbers can't be stored inside a primitive type  , since I need to do it char by char from the strings I am given,I have already created a class called BigNumber, with this class I can: </p>
  
  <ol>
  <li>Add</li>
  <li>multiply</li>
  <li>compare two strings with large integers inside</li>
  </ol>
  
  <p>Now I only need to implement the Dividing method but I can't get my head around how to do it with two strings instead of one String and an Int, here's what I got so far, it works if the number we are dividing the String by is small enough to be an int</p>
  
  <pre><code>class BigNumber {
      String Number;
  BigNumber div(BigNumber other) {
          String result= "";
          String num1= this.Number;
          long Divisor = Integer.parseInt(other.Number);
          int index = 0;
          long NumTemp = num1.charAt(index)-'0';
          while (NumTemp &lt; Divisor){
              NumTemp = NumTemp * 10 +(num1.charAt(index+1) - '0');
              index++;
          }
          while (num1.length()-1 &gt; index){
              result += (NumTemp/Divisor) ;
              NumTemp = (NumTemp % Divisor) * 10 + num1.charAt(index+1) - '0';
              index++;
          }
          result += (NumTemp/Divisor);
          System.out.println(result);
          System.out.println(NumTemp);
          BigNumber Big = new BigNumber(result);
          return Big;
      }
  }
  `
  </code></pre>
  
  <p>PS: My class can also subtract one large number to another, if that helps with the division</p>