You are viewing a single comment's thread. Return to all comments →
in your version, in loop j is redundant.
int result=0; for(int k=0;k<=n-1;k++){ result=(int)Math.pow(2,k)*b + result; System.out.print(a+result+" "); } 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 →
in your version, in loop j is redundant.