0
Can anyone help me with this task? A console app(without input from the console - possibly with arrays with fixed in-app data)
At a shooting competition that takes place once a year, there are up to 30 contestants. For each individual competition, a stand-alone list of participants information is made. Each athlete is described with the name, ID, and pts he receives (for example: Ivan Ivanov -1234- 60). Competition data was entered in 2015, 2016, and 2017. Provide information: -for the race with the highest total number of pts and the race with the lowest total number of pts. -the competitor with the highest total pts for all years
1 Answer
0
You could make a struct that incorporates the {name, id, pts} datas.
Now make a vector(/array) of said structs for each competition.
From here it is pretty straightforward:
1: just parse through each list, sum up the points and store min/max.
2: same, iterate through, store a pointer to the highest point (for example) and return that point