Lab 7: Find & Fix Bugs

Code below intends to sum up an array of scores, but it contains some problems.

You need to first find those problem, list them in comments, then fix them.

There are 6 problems in total, each worth 1/2 points. 

// Lab 7 

// Partner names: 

//  

// Problems found:

// 1. 

// 2. 

// 3. 

// 4. 

// 5. 

// 6. 

#include <iostream>

using namespace std;

const int Max = 5

// Catch the sum and the scores array as parameters below

void getScores(???)

{

   for( int i = 1; i < 10; i++) {

      sum = sum + i;      

   }

   cout << "Sum is: "

        << sum << endl;

}

//-----------------------------------------------

int main() 

{

   int sum;

   int scores[Max] = {72, 85, 93, 59, 78};

   // Pass the sum and the scores array to the function

   sumScoreValues(???);

   // Display the average of the score values

   cout << "Average is: " << 1.0 * sum / Max << endl;

}