You are viewing a single comment's thread. Return to all comments →
class Student { private: vector<int> scores; public: void input() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; scores = { a, b, c, d ,e }; }; int calculateTotalScore() { return accumulate(scores.begin(), scores.end(), 0); }; };
Seems like cookies are disabled on this browser, please enable them to open this website
Classes and Objects
You are viewing a single comment's thread. Return to all comments →