什么是该循环的数组搜索版本?所以下面这个相同的循环没有嵌套if else。数组搜索vs嵌套如果其他人在c + +
Test t;
int A;
int B;
int C;
int D;
int F;
for(int i = 0; i < gradeCount;i++){
if(t.getScore() <= 100 && t.getScore() >= 90)
A++;
else if(t.getScore() >= 80 && t.getScore() <= 89)
B++;
else if(t.getScore() >= 70 && t.getScore() < 79)
C++;
else if(t.getScore() >= 60 && t.getScore() < 69)
D++;
else if(t.getScore() <= 59)
F++;
}
你想知道什么?..? –
plz换句/改写你的问题/ –
@AhmedZ。改写为 – user12074577