# Introduction In this lab, we will learn how to write a C++ program that finds the sum of the series 1 + 2 + 4 + 8 + 16 + 32 + ... + n. We will use two different approaches. The first approach uses a for loop to add values in the sequence, while the second approach uses a mathematical formula to calculate the sum.

Click the virtual machine below to start practicing