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