?? 統(tǒng)計(jì)成績.cpp
字號(hào):
#include<iostream.h>
int &level(int gread,int &typeA,int &typeB,int &typeC);
void main(){
int typeA=0,typeB=0,typeC=0;
int stu=9;
int a[9]={90,75,83,66,58,40,80,85,71};
for(int i=0;i<stu;i++)
level(a[i],typeA,typeB,typeC)++;
cout<<"A類學(xué)生數(shù)"<<typeA<<endl;
cout<<"B類學(xué)生數(shù)"<<typeB<<endl;
cout<<"C類學(xué)生數(shù)"<<typeC<<endl;
}
int &level(int gread,int &typeA,int &typeB,int &typeC){
if(gread>=80)return typeA;
else if(gread>=60)return typeB;
else return typeC;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -