This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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