(Solved) : Write Program Stores Following Data Soccer Player Structure Player S Name String Players N Q42723224 . . .

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…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?