Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that gives the user a menu of 8 options. The options are: Read i

ID: 3647071 • Letter: W

Question

Write a program that gives the user a menu of 8 options. The options are:

Read in 10 scores (integers) from the user.
Read in 10 scores from a file, scores.txt.
Print the 10 scores.
Print the highest score.
Print the lowest score.
Print the mean (average) of the 10 scores.
Print a score based on an entry or row# and show how many scores are higher.
Exit the program.

*You must store the scores in an array. The size of the array should be declared as a global constant. You should initialize the array to some value (probably 0) in case the user chooses options 3 - 7 before 1 or 2. Options 1 or 2 will overwrite any value previously stored in the array.
*Each option in the menu must simply call a function. Each function must at minimum pass in the array and the size of the array.
*You may use the input file, provided here => numbers.txt or you may create your own. You do not need to turn in your input file. Please note that I will be using this version of the numbers.txt when testing your program.

Explanation / Answer

// This program reads data from a file into an array. #include #include using namespace std; int main() { const int ARRAY_SIZE = 10; // Array size int numbers[ARRAY_SIZE]; // Array with 10 elements int count = 0; // Loop counter variable ifstream inputFile; // Input file stream object // Open the file. inputFile.open("TenNumbers.txt"); // Read the numbers from the file into the array. while (count > numbers[count]) count++; // Close the file. inputFile.close(); // Display the numbers read: cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote