输出某个学生的成绩-C语言学习资料

时间:2021-04-25 17:49:13
【文件属性】:
文件名称:输出某个学生的成绩-C语言学习资料
文件大小:633KB
文件格式:PPT
更新时间:2021-04-25 17:49:13
C语言 输出某个学生的成绩 #include float *find(float(*pionter)[4],int n); void main() { float  score[5][3]={{65,98,76},{78,69,87}, {67,68,81},{80,65,98},{64,83,79}};  float *p; int i,m; printf("Enter the number to be found:"); scanf("%d",&m); printf("the score of NO.%d are:\n",m); p=find(score,m); /*调用函数在score中找第m个学生所在行的首地址*/ for(i=0;i<3;i++) printf("%5.2f\t",*(p+i)); } float *find(float(*pointer)[3],int n) /*函数功能:在指针指向的二维数据中找第n行的首地址,并返回*/ { float *pt; pt=*(pointer+n); return(pt); } 返回指针值的函数

网友评论