-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvp_main.cpp
42 lines (35 loc) · 1.11 KB
/
mvp_main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
louis cerda
cpsc 121 sec 3
11/3/2021
pa 6
*/
#include "header.h"
#include <string>
#include <cmath>
int main(){
extern double currentTeam[12]; /// 'extern' tells the compiler that this array has been declared in another .cpp file, and to go look for it.
double score;
double highestscore = 0.0;
double avg1, highestavg;
// only are 10 arrays so 11 is upard bounds
for (int i = 1; i < 11; i++) {
/*
1. load team into current team
2. read out elemts of array
3. determine highest score for that team
4. determine avg
5. compare it to the highest avg
*/
loadTeam(i, currentTeam); // loads team that is current
readElements(currentTeam);
score = determineHighScore(currentTeam);
computeHighest(highestscore, score);
avg1 = computeAvgScore(currentTeam);
computeHighest(highestavg, avg1);
cout << endl;
}
cout << "this score was the mvp: " << highestscore << endl;
cout << "this was the highest average of a team: " << highestavg << endl;
return 0;
}