Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can I please get some help with this? I've done all I can but it's not debugging in Microsoft Studio. Here is the code: #include

image text in transcribed

Can I please get some help with this? I've done all I can but it's not debugging in Microsoft Studio.

Here is the code:

#include using namespace std; struct student { string name; string number; int point; } s[5]; int main() { int total=0,max=0,player; cout > s[i].number; cout > s[i].point; total+=s[i].point; // calculating total points if(s[i].point>max) // finding player with maximum points { max=s[i].point; player=i; } cout

-------

Write a program that stores the following data about a soccer player in a structure: Player's Name: string Player's Number: string Points Scored by Player: int The program should keep an array of 5 of these structures. Each element is for a different 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. Sample run; Please input players' information... Here are the players: Number Name Points Player 1 Name: Reed Richards Reed's number: 12345 Reed's points: 50 12345 23456 34567 45678 56789 Reed Richards Peter Pan Charlie Brown Steve Rogers Tony Stark 50 10 7 51 45 Player 2 Name: Peter Pan Peter's number: 23456 Peter's points: 10 Total points earned by the team: 163 The player with highest score: Steve Rogers #45678 Player 3 Name: Charlie Brown Charlie's number: 34567 Charlie's points: 7 Player 4 Name: Steve Rogers Steve's number: 45678 Steve's points: 51 Player 5 Name: Tony Stark Tony's number: 56789 Tony's points: 45 Write a program that stores the following data about a soccer player in a structure: Player's Name: string Player's Number: string Points Scored by Player: int The program should keep an array of 5 of these structures. Each element is for a different 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. Sample run; Please input players' information... Here are the players: Number Name Points Player 1 Name: Reed Richards Reed's number: 12345 Reed's points: 50 12345 23456 34567 45678 56789 Reed Richards Peter Pan Charlie Brown Steve Rogers Tony Stark 50 10 7 51 45 Player 2 Name: Peter Pan Peter's number: 23456 Peter's points: 10 Total points earned by the team: 163 The player with highest score: Steve Rogers #45678 Player 3 Name: Charlie Brown Charlie's number: 34567 Charlie's points: 7 Player 4 Name: Steve Rogers Steve's number: 45678 Steve's points: 51 Player 5 Name: Tony Stark Tony's number: 56789 Tony's points: 45

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

OUTCOME 5 Discuss sexual harassment as an employment equity issue.

Answered: 1 week ago