You are viewing a single comment's thread. Return to all comments →
this program can be done without using pow function, which is a easy method to approach for beginners.
for(int j = 0; j < n; j++){ a = a + (int)Math.pow(2,j)*b; System.out.print(a + " "); } System.out.println("");
Java Loops II
You are viewing a single comment's thread. Return to all comments →
this program can be done without using pow function, which is a easy method to approach for beginners.