Java Loops II

  • + 0 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....