You are viewing a single comment's thread. Return to all comments →
yes, instead of this use Math.pow() operator..... Hope this is helpful!!!!
for(int i=0;i
int sum = a+b; for(int j=1; j<=n; j++){ System.out.print(sum+" "); sum+=((Math.pow(2,j))*b); } System.out.println(); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java Loops II
You are viewing a single comment's thread. Return to all comments →
yes, instead of this use Math.pow() operator..... Hope this is helpful!!!!
for(int i=0;i