Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct PlayerRecord [5]{
  6. char Nickname [50];
  7. int age;
  8. int bestScore1;
  9. int bestScore2;
  10. };
  11.  
  12. void MainMenu() {
  13. PlayerRecord player[5];
  14. int choice;
  15. cout << "==============================" << endl;
  16. cout << " MENU " << endl;
  17. cout << "==============================" << endl;
  18. cout << "1. Add record" << endl;
  19. cout << "2. View player records" << endl;
  20. cout << "3. Compute for average" << endl;
  21. cout << "4. Show the player(s) who gets the max average" << endl;
  22. cout << "5. Show the player(s) who gets the min average" << endl;
  23. cout << "6. Exit" << endl;
  24. cin >> choice;
  25. switch (choice) {
  26. case 1:
  27. cout << "Enter the nickname: ";
  28. cin >> player[0].Nickname;
  29. cout << "Enter the age: "
  30. cin >> player[0].age;
  31. cout << "Enter the 1st best score: ";
  32. cin >> player[0].bestScore1;
  33. cout << "Enter the 2nd best score: ";
  34. cin >> player[0].bestScore2;
  35. break;
  36. case 2:
  37. }
  38. }
  39.  
  40. int main() {
  41.  
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement