2022-11-01 11:57发布
#include#defineARRAY_LEN5/*数组长度*/intmain(void){intarr[ARRAY_LEN],max,mi
#include<stdio.h>#include<algorithm>using namesapce std;int main(){int a[100];int sum = 0;for(int i=0;i<10;i++)scanf("%d",&a[i]),sum += a[i];sort(a,a+10);printf("min=%d max=%d avg=%f\n",a[0],a[9],1.0*sum/10);}
最多设置5个标签!
#include<stdio.h>
#include<algorithm>
using namesapce std;
int main()
{
int a[100];
int sum = 0;
for(int i=0;i<10;i++)
scanf("%d",&a[i]),sum += a[i];
sort(a,a+10);
printf("min=%d max=%d avg=%f\n",a[0],a[9],1.0*sum/10);
}
一周热门 更多>