You are viewing a single comment's thread. Return to all comments →
Yah, It's a simple question to loop and print a series of the form (a+1*b)+(a+1*b+2*b)+(a+1*b+2*b+4*b)+...........
You need to append always Math.pow(2,j) times b i.e 2^1*b,2^2*b....
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 →
Yah, It's a simple question to loop and print a series of the form (a+1*b)+(a+1*b+2*b)+(a+1*b+2*b+4*b)+...........
You need to append always Math.pow(2,j) times b i.e 2^1*b,2^2*b....