#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("
每天0.2倍,连续%d,总共会受益:%lf倍",day,total);
}
#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("
每天0.2倍,连续%d,总共会受益:%lf倍",day,total);
}