java using BigInteger and While
<p>I have a problem </p>

<pre><code>import java.math.BigInteger;
import java.io.*;
import java.util.*;
import java.lang.*;

public class medici {
   public static void main(String[] arg)  {
{     

  BigInteger zac = new BigInteger("3");
  zac = zac.pow(399);

  BigInteger kon = new BigInteger("3");
  kon = kon.pow(400); 

BigInteger nul = new BigInteger("0");
BigInteger jed = new BigInteger("1");
BigInteger detel = new BigInteger("3");


for (BigInteger a = zac; a.compareTo( kon ) &lt;= 0; a = a.add(jed)) {


 cis = a ;      // THIS A PROBLEM
String retez = "";

 while ( cis &gt; 0 );      // THIS IS A PROBLEM

retez = ( cis.mod(detel) ) + retez;

cis = cis.divide(detel);

         System.out.println(retez);

}      
}
}
}
</code></pre>

<p>Ive tried this formula <code>BigInteger cis = new BigInteger("a");</code> for this <code>cis = a ;</code></p>

<p>and <code>while ( cis.compareTo( nul ) &gt;  0 );</code> for this <code>while ( cis &gt; 0 );</code></p>

<p>but it doesnt work and I dont know why.</p>

<p>when I use this formula, this is the same, but I used only integer when I use the same for Big Integer It doesnt work</p>

<pre><code>import java.io.*;
import java.util.*;
import java.lang.*;

public class netik {
   public static void main(String[] arg)  {
{          
int a ;
int cis;
int detel = 3;

for ( a = 567880; a &lt;= 567890; a++ ){

cis = a;

String retez = "";

      while (cis &gt; 0)  {

      retez = (cis % detel) + retez;

      cis /= detel;

      }
System.out.println(retez);    
}
}
}
}
</code></pre>
