ch9_8.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:

C#编程

开发平台:

Visual C++

  1. //*********************
  2. //**    ch9_8.cpp    **
  3. //*********************
  4. #include <iostream.h>
  5. int array[6][4]={{60,80,90,75},
  6.                  {75,85,65,77},
  7.                  {80,88,90,98},
  8.                  {89,100,78,81},
  9.                  {62,68,69,75},
  10.                  {85,85,77,91}};
  11. int& level(int grade[], int size, int& tA, int& tB);
  12. void main()
  13. {
  14.   int typeA=0,typeB=0;
  15.   int student=6;
  16.   int gradesize=4;
  17.   for(int i=0; i<student; i++)    //处理所有的学生
  18.     level(array[i], gradesize, typeA, typeB)++;    //函数调用作为左值