# CAN YOU SOLVE THIS WITH EXPLANATION? The first part of your program will read some player...

###### Question:

CAN YOU SOLVE THIS WITH EXPLANATION?

The first part of your program will read some player information from a file, format the information, put it into an array of structures, and then display that array on the screen. You will find the following structure useful: The input for your program is in a file called players.txt. Each record in the file represents one player and is made up of multiple fields that are separated by colons. The fields for each player are the player name, role, number of goals scored, number of assists, and number of shots attempted. A record in the file resembles the following: Your main function should open players.txt, check that it opened correctly, and should invoke a function (readPlayer) that reads the contents of players.txt into an array of playerlnfo structures. The readPlayer function should take as input the array of playerlnfo structures and it should return the number of players in the array. Upon return of readPlayer, your program should invoke displayPlayer, a new function, which takes the playerlnfo array and the number of elements in this array, and it displays for each player, their name, number of goals scored, number of assists, number of points, number of shots, and shooting percentage as follows: Use the following formulas for the calculated values (points and shooting %) using a function: Number of Points = Number of Goals Scored + Number of Assists Shooting Percentage = Number of Goals Scored/Number of Shots Taken * 100

#### Similar Solved Questions

##### Prepare journal entries, as appropriate, to record these transactions. (We suggest you post the journal entries...
Prepare journal entries, as appropriate, to record these transactions. (We suggest you post the journal entries to general ledger T-accounts.) Note: The Croton City continuing problem is introduced in Chapter 3 on page 3-32. You should review the scenario in Chapter 3 before preparing the journal en...
##### QUESTION 1 In 1900, the leading cause of death in the United States was which of...
QUESTION 1 In 1900, the leading cause of death in the United States was which of the following conditions? diphtheria pneumonia and influenza tuberculosis typhoid fever QUESTION 2 Which of the following types of behaviors is typically easiest to change? A. New behaviors that can be substituted with ...
##### . Complete the following statements with one of the terms listed below. A term may be...
. Complete the following statements with one of the terms listed below. A term may be used once, more than once, or not at all. •             Finished goods inventory •          ...
##### On February 1, 2021, Arrow Construction Company entered into a three-year construction contract to build a...
On February 1, 2021, Arrow Construction Company entered into a three-year construction contract to build a bridge for a price of $8,030,000. During 2021, costs of$2,010,000 were incurred with estimated costs of $4,010,000 yet to be incurred. Billings of$2,510,000 were sent, and cash collected was ...
##### 38. Determine the structure based on the following molecular formula, IR, and NMR spectrum: Formula, Coloạo 2H2H
38. Determine the structure based on the following molecular formula, IR, and NMR spectrum: Formula, Coloạo 2H2H...
##### 1. Write an equation that describes voltage supplied by a wall outlet. (f = 60 Hz,...
1. Write an equation that describes voltage supplied by a wall outlet. (f = 60 Hz, Vrms = 120 V) 2. What is the instantaneous voltage of a sine wave at half of a period? Describe Alternating Current (AC). Explain how resistors, capacitors, and inductors behave in an AC circuit. WRITEUP REQUIREMENTS...
##### Gulliver Travel Agencies thinks interest rates in Europe are low. The firm borrows euros at 9...
Gulliver Travel Agencies thinks interest rates in Europe are low. The firm borrows euros at 9 percent for one year. During this time period the dollar falls 12 percent against the euro. What is the effective interest rate on the loan for one year? (Consider the 12 percent fall in the value of the do...
##### Renal Nursing List 2 (two) examples for the problems listed in the left column questions answer?...
Renal Nursing List 2 (two) examples for the problems listed in the left column questions answer? 8.7)Types of dialysis 8.8) Parts of the urinary system 8.9) Purposes / indication for bladder irrigation 8.10) Diseases causing proteinuria...
##### A physicist's left eye is myopic (i.e., nearsighted). This eye can see clearly only out to...
A physicist's left eye is myopic (i.e., nearsighted). This eye can see clearly only out to a distance of 35 cm. Find the focal length and the power of a lens that will correct this myopia when worn 2.0 cm in front of the eye. focal length: power: power: diopters Is this a converging or a divergi...
##### 1. (4) The following are the results from an interrupted mating experiment. Your supervisor has asked...
1. (4) The following are the results from an interrupted mating experiment. Your supervisor has asked you to interpret these results and draw a map showing the distances between the genes. The experimental set up was as follows: Hfr arg + mal + met + pur + pyr + xyl + azi s X F - arg- mal- met- pur-...
##### Correct the following tenese Concentration does not mean (1) think only one idea
correct the following tenese Concentration does not mean (1) think only one idea. Concentration means holding a central issue in mind while you (2)except or reject ideas that are related to that issue. In the words of F. Scott (3)(1896-1940), author of the nover (4)"The Great Gatsby," "T...
##### 12. If two groups of numbers have the same mean, then their standard deviations must also...
12. If two groups of numbers have the same mean, then their standard deviations must also be equal. their medians must also be equal. their modes must also be equal. other measures of location need not be the same 13. The Sample Mean can never be negative. can assum...