主题:帮我查查错
#include <stdio.h>
void main()
{
float x,max,max1,max2,y1,y2,y3,y4,y5;
printf("请输入存款金额:\n");
scanf("%d",&x);
y1=x*0.0225*1;
y2=x*0.027*2;
y3=x*0.0324*3;
y4=x*0.036*5;
y5=x*0.04*8;
if(y1>y2)
max1=y1;
else max1=y2;
if(y3>y4)
max2=y3;
else max2=y4;
if(max1>max2)
max=max1;
else max=max2;
if(y5>max)
max=y5;
printf("最大值为:%f\n",max);
}
void main()
{
float x,max,max1,max2,y1,y2,y3,y4,y5;
printf("请输入存款金额:\n");
scanf("%d",&x);
y1=x*0.0225*1;
y2=x*0.027*2;
y3=x*0.0324*3;
y4=x*0.036*5;
y5=x*0.04*8;
if(y1>y2)
max1=y1;
else max1=y2;
if(y3>y4)
max2=y3;
else max2=y4;
if(max1>max2)
max=max1;
else max=max2;
if(y5>max)
max=y5;
printf("最大值为:%f\n",max);
}