float min,max,s=0; for(i=0;i float a,b,d,x[100]; { while(1) s+=x[i]; { printf("\n n="); if(max max=x[i]; scanf("%d",&n); if(n>0 && n<=100) break; if(min>x[i]) min=x[i]; printf("\n Hato 0 } } s/=n; printf("\n Elementlar qiymatini kiriting:\n"); printf("\n max=%f",max); for(i=0;i min=%f",min); {printf("\n O‘rta qiymat=%f",s); printf("x[%d]=",i); getch(); scanf("%f",&x[i]); } max=x[0]; min=x[0] return 0;} //---------------------------------------------------- Quyida dastur kodi va olingan natija keltirilgan(5.1-rasm): 101>Yüklə 201,08 Kb.Dostları ilə paylaş:
float a,b,d,x[100]; {
while(1) s+=x[i];
{
printf("\n n="); if(max max=x[i];
scanf("%d",&n);
if(n>0 && n<=100) break; if(min>x[i])
min=x[i];
printf("\n Hato 0 } } s/=n; printf("\n Elementlar qiymatini kiriting:\n"); printf("\n max=%f",max); for(i=0;i min=%f",min); {printf("\n O‘rta qiymat=%f",s); printf("x[%d]=",i); getch(); scanf("%f",&x[i]); } max=x[0]; min=x[0] return 0;} //---------------------------------------------------- Quyida dastur kodi va olingan natija keltirilgan(5.1-rasm): 101>Yüklə 201,08 Kb.Dostları ilə paylaş:
}
max=%f",max);
for(i=0;i min=%f",min); {printf("\n O‘rta qiymat=%f",s); printf("x[%d]=",i); getch(); scanf("%f",&x[i]); } max=x[0]; min=x[0] return 0;}
min=%f",min);
{printf("\n O‘rta qiymat=%f",s);
printf("x[%d]=",i); getch();
scanf("%f",&x[i]);
max=x[0];
//----------------------------------------------------
Quyida dastur kodi va olingan natija keltirilgan(5.1-rasm):