题目(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\n", x);
    return EXIT_SUCCESS;
}
posted @ 2020-01-30 18:54  Aeterna_Gungnir  阅读(70)  评论(0编辑  收藏  举报