# include<iostream.h>
int Sgread[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_gread(int gread[] ,int greadsize,int &tA,int &tB)
{
int sum=0;
for(int i=0;i<greadsize;i++)
sum+=gread[i];
sum=sum/greadsize;
if (sum>=80) return tA; //将学生成绩分为两类,
else return tB;
}
void main()
{
int hangshu=6,lieshu=4;
int tapeA=0,tapeB=0;
for(int i=0;i<hangshu;i++)
level_gread(Sgread[i],lieshu,tapeA,tapeB)++;//这一行实在看不懂?能将这一行换个表达方式么?
cout<<"number of tape A is:"<<tapeA<<endl;
cout<<"number of tape B is:"<<tapeB<<endl;
}