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