当前位置: 首页 > 工具软件 > Cleo > 使用案例 >

#单利,复利。Daphne,Cleo。

秦阳旭
2023-12-01
#include <iostream>

using namespace std;

void main()
{
	double z1=100, z2=100,z3=100;
	int year=0;
	while (z3<=z1)
	{
		year++;
		z1 = 100 + 10 * year;
		z3 = z2*1.05;
		z2 = z2*1.05;
	}
	cout << year << endl;
	system("pause");
}

答案   27年
 类似资料: