Skip to content

Instantly share code, notes, and snippets.

@asclines
Created March 24, 2017 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asclines/41fc19cb44d219b135fde126c4275a0e to your computer and use it in GitHub Desktop.
Save asclines/41fc19cb44d219b135fde126c4275a0e to your computer and use it in GitHub Desktop.
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