#include<stdio.h>
int main(){
void average(float *p,int n);
float score[3][4]={{65,67,70,60},{80,87,90,81},{90,99,100,98}};
average(*score,12);
return 0;
}
void average(float *p,int n){
float sum=0,aver;
float *p_end;
p_end=p+n-1;
for(;p<=p_end;p++)
sum=sum+(*p);
aver=sum/n;
printf("average=%5.2f\n",aver);
}
加粗的两行我合并成:
for(;p<=((p+n)-1);p++)
系统就会出现停止工作的弹框,什么问题?求猿大神们指点一下!!!急
Hugh_33
相关分类