Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Student{
private:
int scores[5];
public:
void input(){
for(int i = 0; i < 5; i ++){
cin >> scores[i];
}
}
int calculateTotalScore(){
int total = 0;
for(int i = 0; i < 5; i ++){
total += scores[i];
}
return total;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment