Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct PlayerRecord [5]{
- char Nickname [50];
- int age;
- int bestScore1;
- int bestScore2;
- };
- void MainMenu() {
- PlayerRecord player[5];
- int choice;
- cout << "==============================" << endl;
- cout << " MENU " << endl;
- cout << "==============================" << endl;
- cout << "1. Add record" << endl;
- cout << "2. View player records" << endl;
- cout << "3. Compute for average" << endl;
- cout << "4. Show the player(s) who gets the max average" << endl;
- cout << "5. Show the player(s) who gets the min average" << endl;
- cout << "6. Exit" << endl;
- cin >> choice;
- switch (choice) {
- case 1:
- cout << "Enter the nickname: ";
- cin >> player[0].Nickname;
- cout << "Enter the age: "
- cin >> player[0].age;
- cout << "Enter the 1st best score: ";
- cin >> player[0].bestScore1;
- cout << "Enter the 2nd best score: ";
- cin >> player[0].bestScore2;
- break;
- case 2:
- }
- }
- int main() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement