# define N 100
Float a, [N]. Float b [N]. int num;
Float ave (float a [N], int num);
Void rank (float a [N], float b [N], int num);
Float the find (float a [N], int num);
Int main (void)
{
int i;
Printf (" a total of a few exam? \n");
The scanf (" % d ", & amp; Num);
Printf (" please input results in turn \ n ");
for(i=0; i
Float e;
E=ave (a, num);
Printf (" average: % f \ n ", e);
Printf (" from big to small order total score: \ n ");
Void rank (float a [N], float b [N], int num);
for(i=0; i
Int y;
Printf (" input to find grades: \ n ");
The scanf (" % f ", & amp; Num);
Y=find (a, num);
If (y
The else printf (" no accord with grades \ n ");
return 0;
}
Float ave (float a [N], int num)
{
int i; Float sum, aver;
for(i=0; i
Return aver.
}
Void rank (float a [N], float b [N], int num)
{
Int I, j, k;
for(i=0; i
for(i=0; i
K=b [j]; B=b [j] [j + 1); B [m + 1]=k; }
}
Float the find (float a [N], int num)
{
Int res=0; int i;
for(i=0; i
{res=I; return res; }}
If (res==0)
Res=num + 1;
return res;
}
CodePudding user response:
What is error message?CodePudding user response:
Float ave (float a [N], int num){
int i; Float sum, aver;
for(i=0; i
Return aver.
}
Here the sum to initialize, float sum=0;