第七天 最佳存款方案

#include<iostream>
#include<cmath>
using namespace std;
int main() {
int n = 4;
double num;
num = 1000 / (1 + 12 * 0.0063);
while (n) {
num = (num + 1000) / (1 + 12 * 0.0063);
n--;
}
cout << num;
}

posted @ 2023-04-17 21:43  贾贾鱼  阅读(14)  评论(0)    收藏  举报