Write a program that stores the following data about a soccerplayer in a structure:
Player’s name : string
Players number : int
Points scored: int
The program should keep an array of 3 of these structures (youcan name it Player). Each element is for a different player on ateam. When the program runs it should ask the user to enter datafor each player using a function called getInfo(). It should thenshow the data that lists each player’s number, name and pointsscored using a function showInfo().
The function prototypes are shown below:
void getPlayerInfo(Player &);
void showInfo(Player);
Sample Run:
Enter the player1 name: Josh
Enter the player1 number: 11
Enter the points of player1: 20
Enter the player2 name: James
Enter the player2 number: 12
Enter the points of player2: 30
Enter the player3 name: Jerry
Enter the player3 number: 13
Enter the points of player3: 40
Output of the program:
Josh | James | Jerry |
11 | 12 | 13 |
20 | 30 | 40 |
in c++
Expert Answer
Answer to Write a program that stores the following data about a soccer player in a structure: Player’s name : string Players nu…