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++