3 条题解
-
0
#include <iostream> #include <iomanip> int main() { double principal_A = 10000; double principal_UIM = 10000; double rate_A = 0.035; double rate_UIM = 0.04; int years = 5; double amount_A = principal_A; for (int i = 0; i < years; ++i) { amount_A += amount_A * rate_A; } double amount_UIM = principal_UIM + principal_UIM * rate_UIM * years; std::cout << std::fixed << std::setprecision(2); std::cout << amount_A << " " << amount_UIM << std::endl; return 0; }
- 1
信息
- ID
- 11
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 2700
- 已通过
- 10
- 上传者