#include //求解,如何改正,输错后如何再输一个数 void main( ) { int mark; int n=0 , sum=0 ; int max=0 , min=100 ; for ( ; ; ) { scanf("%d", &mark); if ( mark > 100 ) { printf(" Mark > 100 , Please reinput \n "); continue; } if ( mark==-1) break; n ++ ; sum=sum + mark ; if( mark > max ) max = mark ; if( mark < min ) min = mark ; } sum=sum/ n ; printf("max =%d , min = %d, aver = %d \n", max , min , sum); }