Can anybody help me figure out how to fix this so it would come out the highest & lowest score???
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double *score;
double total = 0;
double average;
double max = 0;
double min = 0;
int testscore;
int count = 1;
cout << "Enter how many scores do you have: ";
cin >> testscore;
score = new double[testscore]; // Allocate memory
// Get the Test Scores
cout << "\n";
for (count = 1; count <= testscore; count++)
{
cout << "Enter score #"<<count<<": ";
cin >> score[count];
cout <<"\n";
}
// Calculate the total Scores
for (count = 1; count <= testscore; count++)
{
total += score[count];
}
// Calculate the average Test Scores
average = total / testscore;
if (score[count]> max)
{
max = score[count];
}
if (count == 0)
{
min = score[count];
}
if (score[count] < min)
{
min = score[count];
}
// Display the results
cout << fixed << setprecision(2);
cout <<"----------------------------\n";
cout <<"The highest score is: "<<max<<"\n\n";
cout <<"The lowest score is: "<<min<<"\n\n";
cout <<"The average score is: "<<average<<"\n\n";
system ("pause");
return 0;
}