When you look the equation, you would realize that it is the sum of the numbers that are 2 to the power of i where 0 <= i <= 10
Set i and total as 0
Create a while loop that iterates while i is smaller than or equal to 10. Add the 2 to the power of i to the total (cumulative sum). Note that we use pow() method to calculate the power. At the end of the loop, increment the i by 1. Otherwise the loop will be an infinite loop.