#include float somme(float v1, float v2){ return (v1+v2); } void minMax(float *min, float* max, float a, float b, float c){ if( a>b && a>c){ *max = a; }else if (b>a && b>c){ *max = b; }else { *max =c; } if( a*v1){ permuter(v1,v2); } } void traitementSuite( float* min, float* max, float* moyenne, int* existe){ float tmp=0; float res=0; int i=0; scanf("%f",&tmp); if(tmp==0){ *existe =0; }else{ *min = *max = tmp; res = res + tmp; i=1; scanf("%f",&tmp); res = res + tmp; minMax2v(min,&tmp); minMax2v(&tmp,max); while(tmp!=0){ i++; scanf("%f",&tmp); res = res + tmp; minMax(min,max,*min, tmp,*max); } *moyenne= (res/i); *existe=1; } //printf("somme %f i: %d",res,i); } int main(){ float min,max,moyenne; int existe; traitementSuite(&min,&max,&moyenne,&existe); printf("min: %f max: %f moyenne: %f, existe: %d",min,max,moyenne,existe); return 0; }