819编程问题
# include & ltstdio.h & gt
# include & ltconio.h & gt
#define _for(i,a,b)for(int I = a;我& ltb;i++)
使用命名空间std
int分数[10];
双平均,maxn,minn=0x7f,imax,imin
int main(){
系统(“cls”);
_for(i,0,10){
printf("请输入分数:");
scanf("%d ",& amp分数[I]);
平均+=分数[I];
if(maxn & lt;分数[i]){
maxn = scores[I];
IMAX = I;
}
if(Minn & gt;分数[i]){
Minn = scores[I];
imin = I;
}
printf(" \ n ");
}
average-= maxn+Minn;
平均值/= 8.0;
printf(" \ n平均值:%.6lf\n ",平均值);
printf("The max: %.6lf\n ",maxn);
printf(" min:% . 6lf \ n ",Minn);
_for(i,0,10){
if(scores[I]& gt;平均){
printf("%d,%.6lf\n ",i+1,double(maxn));
}
}
printf("max: %d,%.6lf\n ",imax+1,maxn);
printf("min: %d,%.6lf\n\n ",imin+1,Minn);
printf("下一个歌手?& ltY或Y & gt: ");
char k = getch();
if(k = = ' Y ' | | k = = ' Y ')main();
返回0;
}