    01: #include <iostream>
    02: #include <cmath>
    03:
    04: using namespace std;
    05:
    06: double future_value(double p)
    07: {
    08:    double b = 1000 * pow(1 + p / 100, 10);
    09:    return b;
    10: }
    11:
    12: int main()
    13: {
    14:    cout << "Please enter the interest rate in percent: ";
    15:    double rate;
    16:    cin >> rate;
    17:
    18:    double balance = future_value(rate);
    19:    cout << "After 10 years, the balance is "
    20:       << balance << "\n";
    21:
    22:    return 0;
    23: }