Description
#include <iostream>
using namespace std;
int main()
{
int tests[6]; // array declaration
int sum = 0;
float avg;
//input test scores
cout << " Enter " << 6 << " test scores: " << endl;
for (int i = 0; i < 6; i++)
{
cout << "Enter Test " << i + 1 << ": ";
cin >> tests[i];
}
return 0;
}
------------------------------------------------------------------------------------------------------
You should do this to the codes:
1. (5 points) Type in the above program as array1.cpp. Add a comment to include your name and date. Compile and run. Draw a picture showing what the array looks like in memory.
2. (3 points) Add code to print the first test score. Add the following comment://2. Print the first test score
3. (3 points) Add code to print the last test score. Add the following comment://3. Print the last test score
4. (7 points) Add code to print all of the test scores. Add a comment: //4. Print all scores
5. (5 points) Add code to sum the test scores. Print the sum. Add a comment: //5. Sum all scores
6. (5 points) Add code to calculate and print the average test score. Add a comment: //6. Calculate the average
7. (10 points) Add code to add 10 to each test score and print all test scores. //7. Add to all elements
8. (12 points) Add code to find the highest score and display the score. //8. Calculate and display the highest score
Explanation & Answer
Your code is done. Please find the code...