#include
void main()
{
int a = 0; //天数
int b = 1; //苹果数
int sum = 0;
int sum1=0;
double aver;
while(sum<=100)
{
a++;
b=b*2;
sum1=sum;
sum+=b;
}
printf("一共买了%d天,最后一天买了%d,共买了%d个\n",a-1,b/2,sum1);
aver = sum1*0.8/(a-1);
printf("每天平均花%.2f元\n",aver);
}