Question
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
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;j 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started