#include<stdio.h>
int max, min;
int main()
{
int array(int a[], int n);
int i; int qqq[7];
int aver;
printf_s("请输入7个整数:\n");
for (i = 0; i < 7; i++)
{
scanf_s("%d", &qqq[i]);
}
aver = array(qqq, 7);
printf_s("最大值=:%d", max);
printf_s("最小值是:%d", min);
printf_s("平均值是:%d", aver);
return 0;
}
int array(int t[], int n)
{
max = t[0];
min = t[0];
int ave;
int i;
int sum=t[0];
for (i = 1; i < n; i++)
{
max = (max > t[i]) ? max : t[i];
min = (min < t[i]) ? min : t[i];
sum = sum + t[i];
ave = sum / n;
}