I want this function to be pseudo code

profilesareee24
01attiahs_part.docx

Attiah part.

The highest and lowest Functions

Need this function to be pseudo code

//ATTIAH- Display the statistics of the scores.

double highest(int count, int students, double scores[])

{

double highest = 0.0;

highest = scores[0];

for (count = 0; count < students; count++)

{

if (highest < scores[count])

highest = scores[count];

}

cout << "Highest score: " << highest << endl;

return highest;

}

-----------------------------------------------------------------------------------------

double lowest(int count, int students, double scores[])

{

double lowest = 0.0;

lowest = scores[0];

for (count = 0; count < students; count++)

{

if (lowest > scores[count])

lowest = scores[count];

}

cout << "Lowest score: " << lowest << endl;

return lowest;

}

For example: this is my classmate part

// CHERI- Obtain test scores.

int main()

{

// Setting up array to store test scores.

int students;

cout << "Enter the number of students: ";

cin >> students;

// Creating array.

double scores[students];

// Other variables.

int count;

double sum; // Holds the sum of the scores in the array.

double avg; // Holds the average of the scores.

double stdv; // Holds the standard deviation of the scores.

double hs; // Holds the highest score.

double ls; // Holds the lowest score.

// Getting test scores.

for (count = 0; count < students; count++)

{

cout << "Enter the score earned by student "

<< (count + 1) << ": ";

cin >> scores[count];

}

// Displaying the scores.

cout << "The scores you entered are: " << endl;

for (count = 0; count < students; count++)

{

cout << "Student " << (count + 1) << ": ";

cout << scores[count] << endl;

}

cout << endl;

 // Running other functions.

sum = total(count, students, scores);

 avg = average(count, students, scores);

 stdv = standardDeviation(count, students, scores, sum, avg);

 hs = highest(count, students, scores);

ls = lowest(count, students, scores);

 saveToFile(students, count, scores, avg, stdv, hs, ls);

 // Done.

 return 0;

}

Here is the function’s pseudo code:

Get number of test scores.

Create array to hold test scores.

Get test scores from the user.

Display the test scores.

Call total to get the sum of the scores.

Call average to get the average of the scores.

Call standardDeviation to get the standard deviation of the scores.

Call highest to get the highest test score.

Call lowest to get the lowest test score.

Call saveToFile to save all the data to a file.