#include #include //for the "i/o manipulators" setw and setprecision #include using namespace std; //Interest is 6% annually. int main() { double principal {1000.00}; //start with this many dollars cout << "year principal\n" //column headings << "---- ---------\n"; for (int year {1}; year <= 30; ++year) { principal *= 1.06; //means principal = principal * 1.06 cout << " " << setw(2) << year << " $" << fixed << setprecision(2) << principal << "\n"; //Every 10 years, skip a line for legibility. if (year % 10 == 0) { cout << "\n"; } } return EXIT_SUCCESS; }