2023-07-26 14:12发布
创意的考试题目吗#p##include#includeusing namesapce std;int main(){in
#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);
}
一周热门 更多>