Created
March 24, 2017 22:08
-
-
Save asclines/41fc19cb44d219b135fde126c4275a0e to your computer and use it in GitHub Desktop.
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