题目(17)答案

#include <iostream>
#include <cstdlib>
#include <cstdio>

using namespace std;

int main()
{
    double x, sum = 0;
    int year;
    cin >> x >> year;
    for(int i = 0; i < year; i++)
    {
        x = x * (1.0 + 0.001);
    }
    printf("%.4f
", x);
    return EXIT_SUCCESS;
}
原文地址:https://www.cnblogs.com/coding365/p/12872400.html