



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of arrays, a fundamental data structure in computer science. It covers the basics of declaring and initializing arrays, as well as how to store and retrieve data within them. The document then presents a scenario where the user is tasked with storing the names and test scores of 30 students, calculating the total score and average for the class, and identifying the student with the highest score. The document walks through the pseudocode for this scenario, demonstrating how arrays can be used to efficiently manage and analyze large sets of data. This resource would be particularly useful for students studying data structures, algorithms, or introductory programming courses, as it provides a practical example of how arrays can be applied to real-world problems.
Typology: Schemes and Mind Maps
1 / 6
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.