Programming Exercise: Average Calculation Modification… For this program, you will modify the average calculation assignment from Module 9. The program should start the same, asking the user to enter 6 test scores and storing them in the array. The program should sort the array in ascending order and display the current average, dropping the lowest score. The final step is to give the user the opportunity to modify one of the grades to see how it affects the average. Ask the user which score they would like to modify and what value to change it to. Modify the score and then display the new average using the new score. Example Output: Enter grade #1 100[Enter] Enter grade #2 90[Enter] Enter grade #3 95[Enter] Enter grade #4 98[Enter] Enter grade #5 88[Enter] Enter grade #6 92[Enter] The low grade of 88 was dropped resulting in an average of 95 Which score would you like to change? 85 [Enter] I could not find that score, please enter a valid score: 88 [Enter] What will this score be changed to? 92 [Enter] The low grade of 90 was dropped resulting in an average of 95.4

Introduction:

In this programming exercise, we will modify an average calculation program from Module 9. The program will ask the user to enter 6 test scores and store them in an array. It will then sort the array in ascending order and display the current average, dropping the lowest score. Additionally, the program will allow the user to modify one of the grades and see how it affects the average.

Program Execution:

The program will begin by prompting the user to enter 6 test scores. Each score will be stored in an array of size 6. Once all the scores have been entered, the program will sort the array in ascending order using a sorting algorithm such as bubble sort or insertion sort.

Next, the program will calculate the average of the 5 highest scores by summing them up and dividing by 5. The lowest score will be dropped from the calculation. The program will then display the current average to the user.

After displaying the current average, the program will give the user the opportunity to modify one of the grades. The user will be asked to enter the score they want to modify and what value they want to change it to.

If the entered score is not found in the array, the program will display an error message and prompt the user to enter a valid score. Once a valid score is entered, the program will update the array with the new score and recalculate the average.

Finally, the program will display the new average to the user, taking into account the modified score.

Example Output:

Let’s consider an example output for better understanding:

Enter grade #1: 100
Enter grade #2: 90
Enter grade #3: 95
Enter grade #4: 98
Enter grade #5: 88
Enter grade #6: 92

The low grade of 88 was dropped, resulting in an average of 95.

Which score would you like to change? 85
I could not find that score, please enter a valid score: 88
What will this score be changed to? 92

The low grade of 90 was dropped, resulting in a new average of 95.4.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer