2022-12-17 05:01发布
#includemain(){ float a,b,c,max,min,sum,average; printf(请输入三个实数,
int a,b,c,MAX,MIN;sancf("%d%d%d",&a,&b,&c);MAX=MIN=a;if(MAX < b)MAX = b;if(MIN > b) MIN = b;if(MAX < c) MAX = c;if(MIN > c) MIN = c;printf("和=%d,平均=%f",MIN+MAX,((folat)(MAX+MIN))/2);
最多设置5个标签!
main()
{
float a,b,c,max,min,sum,average;
printf("请输入三个实数,以空格隔开");
scanf("%f %f %f",&a,&b,&c);
max=a;
min=a;
if(b>max) max=b;
if(b<min) min=b;
if(c>max) max=c;
if(c<min) min=c;
sum=min+max;
average=sum/2;
printf("和值为%f\n",sum);
printf("平均值为%f\n",average);
}
int a,b,c,MAX,MIN;sancf("%d%d%d",&a,&b,&c);MAX=MIN=a;if(MAX < b)MAX = b;if(MIN > b) MIN = b;if(MAX < c) MAX = c;if(MIN > c) MIN = c;printf("和=%d,平均=%f",MIN+MAX,((folat)(MAX+MIN))/2);
一周热门 更多>