设有20人。
#include "stdio.h"
#define N 20
int main(int argv,char *argc[]){
int a[N],i;
printf("Please enter the %d students scores...\n",N);
for(i=0;iwhile(scanf("%d",a+i)!=1 || a[i]<0 || a[i]>100)
printf("Input error, redo: ");
a[i]>=60 ? a[i]+=10 : a[i]=60;
}
printf("The revised points are as follows:\n");
for(i=0;iprintf("\n");
return 0;
}
运行样例: