Task 1 Write a program that allocates an array large enough to hold 5 student test scores....

50.1K

Verified Solution

Question

Programming

Task 1

Write a program that allocates an array large enough to hold 5student test scores. Once all the scores are entered, the arrayshould be passed to a function that sorts them in ascending order.Another function should be called that calculates the averagescore. The program should display the sorted list of scores andaverages with appropriate headings.

Input Validation: Do not accept negative numbers fortest scores.

Task 2

Modify the program so the lowest test score is dropped. Thisscore should not be included in the calculation of the average.

Task 3

Modify the program to allow the user to enter name-score pairs.For each student taking a test, the user types the student’s namefollowed by the student’s integer test score. Modify the sortingfunction so it takes an array holding the student names and anarray holding the student test scores. When the sorted list ofscores is displayed, each student’s name should be displayed alongwith his or her score.

C++

Answer & Explanation Solved by verified expert
3.7 Ratings (411 Votes)
include using    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students