Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a flow chart for the following code:: if you could just tell me the basic steps of what this code does that would be

Create a flow chart for the following code:: if you could just tell me the basic steps of what this code does that would be appreciated

#include #include using namespace std;

int main() { int *scores, total = 0.0, average; int numScores; int *numPtr = scores;

cout << "How many test scores do you have? "; cin >> numScores;

scores = new int[numScores]; for (int count = 0; count < numScores; count++) { cout << "Test Score #" << (count + 1) << ": "; cin >> scores[count]; while (scores[count]<1) { cout << "Value must be one or greater: "; cin >> scores[count]; } }

cout << "The numbers in set are: "; for (int count = 0; count < numScores; count++) cout << *(scores+count) << " ";

for (int i = 0; i < numScores; i++) { for(int j=0;jscores[j+1]) { int temp = scores[j]; scores[j] = scores[j+1]; scores[j+1] = temp; } } } cout<<" Ascending order for the given set of Scores:"<

average = total / numScores;

cout << " Average Score: " << average; delete [] scores; scores = 0; return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started