c语言程序题:从键盘上任输入三个实数,求出最大数和最小数的和值,

2022-12-17 05:01发布

#includemain(){ float a,b,c,max,min,sum,average; printf(请输入三个实数,

#includemain(){ float a,b,c,max,min,sum,average; printf("请输入三个实数,
2条回答
2022-12-17 05:21 .采纳回答

#include <stdio.h>
void main()
{
int a,b,c,d,e;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
d=a>b? a:b;
d=a>c? a:c;
e=a<c? a:c;
e=a<b? a:b;
printf("max + min=%d\n",d+e);
printf("Average=%d",(d+e)/2);
}

------望采纳!!!

一周热门 更多>