#include #include using namespace std; int main() { double initialInvestment; int numberOfYears; double annualInterestRate; std::cout << "Enter the initial investment amount: $"; std::cin >> initialInvestment; std::cout << "Enter the number of years: "; std::cin >> numberOfYears; std::cout << "Enter the annual interest rate (as a percentage, e.g., 6 for 6%): "; std::cin >> annualInterestRate; annualInterestRate /= 100.0; double futureValue = initialInvestment * pow((1 + annualInterestRate), numberOfYears); std::cout.precision(2); // Set precision for two decimal places std::cout << std::fixed; // Ensure fixed-point notation for currency std::cout << "After " << numberOfYears << " years, your investment will be worth: $" << futureValue << std::endl; return EXIT_SUCCESS; }