L
littlegirl
hi guys how would i sort this in ascending order im not understandin
the *Pt
// This program Enter test scores and sort them in oder and Average
the
#include <iostream
#include <iomanip
using namespace std
int main(
double *score, total = 0, average
int TestScores, count
cout << "How many Test Scroes do you wish to enter "
cin >> TestScores
score = new double[TestScores]; // Allocate memor
// Get the Test Score
cout << "Enter each students test scores.\n"
for (count = 0; count < TestScores; count++
cout << "Student " << (count + 1) <
": "
cin >> score[count]
// Calculate the total Score
for (count = 0; count < TestScores; count++
total += score[count]
// Calculate the average Test Score
average = total / TestScores
// Display the result
cout << fixed << showpoint << setprecision(2)
cout << "Average Score: " << average <
endl
// Free dynamically allocated memor
delete [] score
return 0
the *Pt
// This program Enter test scores and sort them in oder and Average
the
#include <iostream
#include <iomanip
using namespace std
int main(
double *score, total = 0, average
int TestScores, count
cout << "How many Test Scroes do you wish to enter "
cin >> TestScores
score = new double[TestScores]; // Allocate memor
// Get the Test Score
cout << "Enter each students test scores.\n"
for (count = 0; count < TestScores; count++
cout << "Student " << (count + 1) <
": "
cin >> score[count]
// Calculate the total Score
for (count = 0; count < TestScores; count++
total += score[count]
// Calculate the average Test Score
average = total / TestScores
// Display the result
cout << fixed << showpoint << setprecision(2)
cout << "Average Score: " << average <
endl
// Free dynamically allocated memor
delete [] score
return 0