#include <stdio.h>
void Input_Max_Min_Arv(int *p,int *pl,int *ps,double *arv){
int i;
printf("Please enter the 10 Numbers...\n");
for(*pl=*ps=i=0;i<10;i++){
scanf("%d",p+i);
*arv+=p[i];
if(p[i]<p[*ps])
*ps=i;
if(p[i]>p[*pl])
*pl=i;
}
int main(int argc,char *argv[]){
int m[10],ml,ms;
double ma;
Input_Max_Min_Arv(m,&ml,&ms,&ma);
printf("The MAX is m[%d]==%d\nThe MIN is m[%d]==%d\n",ml,m[ml],ms,m[ms]);
printf("The arv is %f",ma/10);
return 0;
#include <stdio.h>
void Input_Max_Min_Arv(int *p,int *pl,int *ps,double *arv){
int i;
printf("Please enter the 10 Numbers...\n");
for(*pl=*ps=i=0;i<10;i++){
scanf("%d",p+i);
*arv+=p[i];
if(p[i]<p[*ps])
*ps=i;
if(p[i]>p[*pl])
*pl=i;
}
}
int main(int argc,char *argv[]){
int m[10],ml,ms;
double ma;
Input_Max_Min_Arv(m,&ml,&ms,&ma);
printf("The MAX is m[%d]==%d\nThe MIN is m[%d]==%d\n",ml,m[ml],ms,m[ms]);
printf("The arv is %f",ma/10);
return 0;
}