分期付款的计算

#include <stdio.h>
#include <math.h>
int main()
{
	int d=324500,p=3245;
	double r=0.008,m=0;

	m=(log10(p)-log10(p-d*r))/log10(1+r);
	printf("month=%f\n",m);
	printf("total=%f\n",m*p);
	return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_39748223/article/details/84892457
今日推荐