ch9_8.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:
C#编程
开发平台:
Visual C++
- //*********************
- //** ch9_8.cpp **
- //*********************
- #include <iostream.h>
- int array[6][4]={{60,80,90,75},
- {75,85,65,77},
- {80,88,90,98},
- {89,100,78,81},
- {62,68,69,75},
- {85,85,77,91}};
- int& level(int grade[], int size, int& tA, int& tB);
- void main()
- {
- int typeA=0,typeB=0;
- int student=6;
- int gradesize=4;
- for(int i=0; i<student; i++) //处理所有的学生
- level(array[i], gradesize, typeA, typeB)++; //函数调用作为左值