We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

I solved this.... I believe the "EASY" level classification is incorrect, Because this question requires significant extra analysis And an understanding of mathematical series to approach.

The question in the way that it's written will not be accessible to most beginning and intermediate programmers, unless you have an academic background in Applied math, discrete algebra, or Calculus.

Anyways, they're looking to provide you A list of "a", "b", "n" values, and repeat this process q times.

Each time you get a list of a, b, n values, they want you to print out the integer Sum which you get when you add up 'n series terms' from the expression.

The first series term is

a + 2^0 * b

The second series term is
a + 2^0 * b + 2^1 * b

This process repeats up to "n", and the n-th series term is

a + 2^0 * b + 2^1 * b + .... + 2^(n-1) * b

Your loop just needs to show the cumulative sum on each series term

I suggest working it out on paper with the sample inputs before writing the program.

## Java Loops II

You are viewing a single comment's thread. Return to all comments →

I solved this.... I believe the "EASY" level classification is incorrect, Because this question requires significant extra analysis And an understanding of mathematical series to approach.

The question in the way that it's written will not be accessible to most beginning and intermediate programmers, unless you have an academic background in Applied math, discrete algebra, or Calculus.

Anyways, they're looking to provide you A list of "a", "b", "n" values, and repeat this process q times.

Each time you get a list of a, b, n values, they want you to print out the integer Sum which you get when you add up 'n series terms' from the expression.

The first series term is

a + 2^0 * b

The second series term is a + 2^0 * b + 2^1 * b

This process repeats up to "n", and the n-th series term is

a + 2^0 * b + 2^1 * b + .... + 2^(n-1) * b

Your loop just needs to show the cumulative sum on each series term

I suggest working it out on paper with the sample inputs before writing the program.