You are viewing a single comment's thread. Return to all comments →
Here is the solution ...
int sum=0; for(int y=0; y<n; y++) { sum = sum+ (int) ((Math.pow(2, y)*b)); System.out.print(sum+a + " "); if(y== (n-1)) { System.out.print("\n"); } }
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 →
Here is the solution ...