



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




How to Store values into an Array
How to output values stored in an Array
Scenario Input and store the names and marks for 30 students who have sat three computer science tests. Test 1 is out of 20 marks, Test 2 is out of 25 marks, Test 3 is out of 35 marks. You must store the names in a one-dimensional array and the marks and total score for each student in one-dimensional arrays. All the marks must be validated on entry and any invalid marks rejected. You may assume that the students’ names are unique. Calculate and store the total score for each student and calculate the average score for the whole class. Output each student’s name followed by their total score, and then output the average score for the class.