java - alogrithm for traveling throw a sequence -


i trying write java code type these numbers

7, 87, 387, 5387, 95387, 195387, 4195387, 64195387, 464195387, 2464195387, 62464195387, 262464195387, 7262464195387, 27262464195387, 627262464195387, 5627262464195387, 75627262464195387, 575627262464195387, 4575627262464195387, 4575627262464195387

but when wrote code on netbeans doesn't give me sequence want

 public class sum30 {      public static void main(string[] args) {       double a;    for(double i=2;i<100;i++){       a=7;    a=  (pow(3,a)%pow(10,i));           system.out.println(a);        }            }} 

please tell me wrong

to on come such defects or error use biginteger has large range , precise value.


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -