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