码迷,mamicode.com
首页 > 其他好文 > 详细

复利计算

时间:2016-03-11 11:52:38      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:

#include<stdio.h>
#include<math.h>

int main()
{
int day;
double total=1.0f;
printf("每天0.2倍,请输入天数:");
scanf("%d",&day);
total=total*pow(1.2,day);
printf("\n每天0.2倍,连续%d,总共会受益:%lf倍",day,total);
}

复利计算

标签:

原文地址:http://www.cnblogs.com/6daomeipengyou/p/5264570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!