阅读下面的代码,输出是( )。
struct Student { int id; int score; };
Student s[3] = {{1, 90}, {2, 80}, {3, 100}};
int total = 0;
for (int i = 0; i < 3; i++) total += s[i].score;
cout << total / 3;
- A.
270 - B.
90 - C.
80 - D.
100
g4-06855.in输出g4-06855.out阅读下面的代码,输出是( )。
struct Student { int id; int score; };
Student s[3] = {{1, 90}, {2, 80}, {3, 100}};
int total = 0;
for (int i = 0; i < 3; i++) total += s[i].score;
cout << total / 3;
2709080100