please ignore what I\'ve written, I just want to see if I have this correct or n
ID: 3830020 • Letter: P
Question
please ignore what I've written, I just want to see if I have this correct or not. if any of that is illegible let me know and I'll decipher it for you.
Wednesday, Ngru PRINT LEGIBLIt Do not write embre prog wrire owly the srpsants. rtone points ecutad 1. Denna two globally deckved tersurta: an Unted States sooom penresenting the mexim LENG players be bak returning players. Declare a structure, soccer risyrr strhthe iollowinE A character array to hold the s Maree (see Hizobove. The recaming payers Mawae negen The number o(goals scored tste player linteger d. Write one 10 deriare & an an for each of type players: C++ stateme wnh data of the retuming Recall tib above) Initialize the first two John Anthony Brooks scored 4 points Beasley ts scored 3 pointsExplanation / Answer
Solution:
a)
const int name_length= 52
b)
const int return_players= 2
c)
struct SoccerPlayer
{
char name[name_length];
int number;
int goalCount;
};
d)
SoccerPlayer Team[return_players];
Team[1].name= "First Player";
Team[1].number= 15;
Team[1].goalCount= 3;
Team[2].name= "Second Player";
Team[2].number= 22;
Team[2].goalCount= 5;
I hope this helps. Don't forget to give a thumbs up if you like this.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.