Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that stores the following data about a soccer player in a struct

ID: 3638155 • Letter: W

Question

Write a program that stores the following data about a soccer player in a structure:

Players name, players number, points scored by the player.

The program should keep an array of 12 of these structures. Each element is for a differnet player on a team. When the program runs it should ask the user to enter the data for each player. It should then show a table that lists each player's number,name, and points scored. The program should also calculate and display the total points earned by the team. The number and name of the player who has earned the most points should also be displayed.
input validation, Not to accept negative values for numer and points.

Explanation / Answer

#include #include #include using namespace std; const int SIZE = 50; int TotalPoints(int *, int); struct Players { char name[SIZE]; //Player's Name int playNum; //Player's Number int Points; //Point's Scored }; int main() { const int NUM_PLAYERS = 12; //Number of Players // Dynamically allocate the memory needed. Players *players = new Players[NUM_PLAYERS]; //Array of structures int index; //Loop // Get Player data. cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote