31 C++
程式片段如下:class Student {private:int score;public:void setScore(int n) {if(n>=90)score=100;else if(n>=60 && n<90)score=n+5;elsescore=n+3;}int getScore () {return score;}void showScore() {cout << getScore() << endl;}}; 若執行以下敘述會得到什麼結果?Student stu;stu.setScore(80);stu.showScore();
(A) 80
(B) 83
(C) 85
(D) 100
答案:登入後查看
統計: A(0), B(1), C(1), D(0), E(0) #3966695
統計: A(0), B(1), C(1), D(0), E(0) #3966695