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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -